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

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>5718</bug_id>
          
          <creation_ts>2008-05-27 14:02:49 +0000</creation_ts>
          <short_desc>Problem validating CSS files with UTF-8 characters</short_desc>
          <delta_ts>2009-02-17 22:16:30 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>CSSValidator</product>
          <component>CSS 2.1</component>
          <version>CSS Validator</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows XP</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Radu Coravu">radu_coravu</reporter>
          <assigned_to name="This bug has no owner yet - up for the taking">dave.null</assigned_to>
          
          
          <qa_contact name="qa-dev tracking">www-validator-cvs</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>20280</commentid>
    <comment_count>0</comment_count>
    <who name="Radu Coravu">radu_coravu</who>
    <bug_when>2008-05-27 14:02:49 +0000</bug_when>
    <thetext>As far as I can see in the specification CSS files can contain all possible Unicode characters if the &quot;@charset&quot; declaration in them allows that.

There seem to be 2 problems in the CssParser.jj file.
First, in the options{} block you should set the &quot;UNICODE_INPUT = true;&quot; property so that the parser can handle unicode chars if the reader was correctly built.
Then, the NONASCII token should probably be declared as:  ~[&quot;\000&quot;-&quot;\177&quot;]
This means anything but ASCII.

I will try to attach 2 test files. The XML is correctly displayed in Firefox but the validator complains about the CSS file</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>20281</commentid>
    <comment_count>1</comment_count>
      <attachid>552</attachid>
    <who name="Radu Coravu">radu_coravu</who>
    <bug_when>2008-05-27 14:03:49 +0000</bug_when>
    <thetext>Created attachment 552
CSS file with UNICODE character 010D</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>20282</commentid>
    <comment_count>2</comment_count>
      <attachid>553</attachid>
    <who name="Radu Coravu">radu_coravu</who>
    <bug_when>2008-05-27 14:04:01 +0000</bug_when>
    <thetext>Created attachment 553
XML file</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>23806</commentid>
    <comment_count>3</comment_count>
    <who name="Yves Lafon">ylafon</who>
    <bug_when>2009-02-17 22:16:30 +0000</bug_when>
    <thetext>Should be fixed by recent updates on the @charset support.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>552</attachid>
            <date>2008-05-27 14:03:49 +0000</date>
            <delta_ts>2008-05-27 14:03:49 +0000</delta_ts>
            <desc>CSS file with UNICODE character 010D</desc>
            <filename>test.css</filename>
            <type>text/css</type>
            <size>136</size>
            <attacher name="Radu Coravu">radu_coravu</attacher>
            
              <data encoding="base64">QGNoYXJzZXQgInV0Zi04IjsNCg0KxI11ayB7IGNvbG9yOiByZWQ7IH0NCmdlayB7IGNvbG9yOiBi
bHVlOyB9DQoNCiogeyBkaXNwbGF5OiBibG9jazsgDQogICAgZm9udC13ZWlnaHQ6IGJvbGQ7DQog
ICAgZm9udC1zaXplOiAyMHB0IH0NCg==
</data>

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>553</attachid>
            <date>2008-05-27 14:04:01 +0000</date>
            <delta_ts>2008-05-27 14:04:01 +0000</delta_ts>
            <desc>XML file</desc>
            <filename>test.xml</filename>
            <type>text/xml</type>
            <size>147</size>
            <attacher name="Radu Coravu">radu_coravu</attacher>
            
              <data encoding="base64">PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4NCjw/eG1sLXN0eWxlc2hlZXQg
aHJlZj0idGVzdC5jc3MiIHR5cGU9InRleHQvY3NzIj8+DQo8dGVzdD4NCiAgPMSNdWs+QUFBPC/E
jXVrPg0KICA8Z2VrPkJCQjwvZ2VrPg0KPC90ZXN0Pg0K
</data>

          </attachment>
      

    </bug>

</bugzilla>