<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.kde.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugs.kde.org/"
          
          maintainer="sysadmin@kde.org"
>

    <bug>
          <bug_id>106554</bug_id>
          
          <creation_ts>2005-05-31 14:13:41 +0000</creation_ts>
          <short_desc>wrong encoding of CSS style stored in separate file (not conforming to CSS/2.1)</short_desc>
          <delta_ts>2006-06-03 20:59:40 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>2</classification_id>
          <classification>Applications</classification>
          <product>konqueror</product>
          <component>khtml</component>
          <version>unspecified</version>
          <rep_platform>Gentoo Packages</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>NOR</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter name="Jan Kundrát">jkt</reporter>
          <assigned_to name="Konqueror Bugs">konqueror-bugs-null</assigned_to>
          <cc>armin.ronacher</cc>
    
    <cc>ewoerner</cc>
    
    <cc>krux</cc>
    
    <cc>neysx</cc>
    
    <cc>nicolasg</cc>
          
          <cf_commitlink></cf_commitlink>
          <cf_versionfixedin></cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>20</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>346650</commentid>
    <comment_count>0</comment_count>
    <who name="Jan Kundrát">jkt</who>
    <bug_when>2005-05-31 14:13:41 +0000</bug_when>
    <thetext>Version:           3.4.0 (using KDE KDE 3.4.0)
Installed from:    Gentoo Packages
Compiler:          gcc (GCC) 3.3.5-20050130 (Gentoo Linux 3.3.5.20050130-r1, ssp-3.3.5.20050130-1, pie-8.7.7.1) 
OS:                Linux

Konqueror/3.4.0 doesn&apos;t conform to CSS/2.1 standard as defined in http://www.w3.org/TR/CSS21/syndata.html#q23 - section about encoding (character set) of external CSS style. Suppose we have HTML page written in UTF-8 (server sends &quot;Content-Type: text/html; charset=utf-8&quot;) which referrs to CSS in external file on the same server. It&apos;s clearly illustrated in http://dev.gentoo.org/~neysx/wwwgo/index.xml.html which referrs to http://dev.gentoo.org/~neysx/wwwgo/css/main.css . Later is also in UTF-8, but the server doesn&apos;t specify the &quot;charset&quot; part of Content-Type header. According to the CSS/2.1 specs, correct behaviour would be to:

1) An HTTP &quot;charset&quot; parameter in a &quot;Content-Type&quot; field (or similar parameters in other protocols) - not usable in this case

2) BOM and/or @charset (see below) - also doesn&apos;t apply

3) &lt;link charset=&quot;&quot;&gt; or other metadata from the linking mechanism (if any)
charset of referring stylesheet or document (if any) - this should be used, but isn&apos;t - se below

4) Assume UTF-8 - fallback, but should *not* happen as it would break a lot of pages, IMHO


So, to the point 3 - you should use the same encoding as the HTML page has, which is UTF-8, in this case. But current behavior is that if you have set (in browser prefs) anything else as a &quot;default codepage&quot;, it is used, which is bad.

Why is this important? In that particular case, external CSS sheet is used to add &quot;content:&quot; property to the links in the left hand column, which should result in a nice arrow before each link. But because konqueror uses other encoding for CSS file parsing, user doesn&apos;t see arrow, but some garbage characters. I can provide screenshot.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>346674</commentid>
    <comment_count>1</comment_count>
    <who name="Xavier Neys">neysx</who>
    <bug_when>2005-05-31 16:14:12 +0000</bug_when>
    <thetext>Using @charset at the beginning of the css had no effect on konqueror

Escaping the character worked but the small triangle appears as a thin box as if the character was not defined. I tried various fonts with the same result. Using a dot instead of a triangle worked.

a.altlink:before {content:&quot;\2022\20&quot;; color:#7a5ada;}  OK
a.altlink:before {content:&quot;\2023\20&quot;; color:#7a5ada;}  Not OK

Escaped char or utf-8 encoded css works with firefox
a.altlink:before {content:&quot;‣ &quot;; color:#7a5ada;}  OK in ff</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>349816</commentid>
    <comment_count>2</comment_count>
    <who name="Eckhart Wörner">ewoerner</who>
    <bug_when>2005-06-12 20:04:52 +0000</bug_when>
    <thetext>*** Bug 107287 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>360951</commentid>
    <comment_count>3</comment_count>
    <who name="Maksim Orlovich">maksim</who>
    <bug_when>2005-07-28 00:43:58 +0000</bug_when>
    <thetext>*** Bug 109735 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>380311</commentid>
    <comment_count>4</comment_count>
    <who name="Maksim Orlovich">maksim</who>
    <bug_when>2005-10-09 21:51:23 +0000</bug_when>
    <thetext>*** Bug 114143 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>444057</commentid>
    <comment_count>5</comment_count>
    <who name="Allan Sandfeld">kde</who>
    <bug_when>2006-06-03 20:59:39 +0000</bug_when>
    <thetext>SVN commit 547892 by carewolf:

Let stylesheets inherit the charset of their parent document or stylesheet.
Introduces a charset property for all stylesheets.
BUG: 106554


 M  +3 -3      css/css_ruleimpl.cpp  
 M  +1 -1      css/css_ruleimpl.h  
 M  +4 -0      css/css_stylesheetimpl.h  
 M  +5 -1      html/html_headimpl.cpp  
 M  +1 -1      html/html_headimpl.h  
 M  +35 -12    misc/loader.cpp  
 M  +5 -4      misc/loader.h  
 M  +1 -1      misc/loader_client.h  
 M  +1 -1      xml/dom_docimpl.cpp  
 M  +1 -1      xml/dom_docimpl.h  
 M  +2 -1      xml/dom_xmlimpl.cpp  
 M  +1 -1      xml/dom_xmlimpl.h  
</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>