<?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>5581</bug_id>
          
          <creation_ts>2008-03-20 12:04:32 +0000</creation_ts>
          <short_desc>Several invalid forms of @charset syntax reported as valid in explicit css2.1 grammar - part II</short_desc>
          <delta_ts>2008-04-03 14:06:45 +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="CecilWard">cecil</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>19559</commentid>
    <comment_count>0</comment_count>
    <who name="CecilWard">cecil</who>
    <bug_when>2008-03-20 12:04:32 +0000</bug_when>
    <thetext>The following test cases are mistakenly reported as &quot;valid&quot; against the explicitly selected CSS 2.1 grammar.
[ checked at 2008-03-20 against live snapshot of the validator, http://qa-dev.w3.org:8001/css-validator/#validate_by_input+with_options ]

--
test case 8: selected grammar=CSS2.1

@charset /**/&quot;utf-8&quot;;

Correct response: INVALID; should report INVALID when selected CSS 2.1 grammar
Current status: INCORRECT: The validator&apos;s response is INCORRECT, as of 2008-03-20.

--

--
test case 9: selected grammar=CSS2.1

@charset/**/ &quot;utf-8&quot;;

Correct response: INVALID; should report INVALID when selected CSS 2.1 grammar
Current status: INCORRECT: The validator&apos;s response is INCORRECT, as of 2008-03-20.

--

--
test case 10: selected grammar=CSS2.1

@charset &quot;utf-8&quot;/**/;

Correct response: INVALID; should report INVALID when selected CSS 2.1 grammar
Current status: INCORRECT: The validator&apos;s response is INCORRECT, as of 2008-03-20.


Regards,

Cecil Ward.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>19562</commentid>
    <comment_count>1</comment_count>
    <who name="CecilWard">cecil</who>
    <bug_when>2008-03-20 13:05:10 +0000</bug_when>
    <thetext>Note: see discussion ref bug 3381

It now appears that, just as predicted earlier, the parsing of the @charset rule has been adversly affected by changes in respect of the bugfixes for bug 3381.

The problem is the current production for the @charset rule in the grammar, which is not &apos;atomic&apos;, not a terminal. It is not ok to allow a lexer to do its usual work in the middle of processing the @charset rule because it is not at liberty to for example collapse multiple items of whitespace nor to eat up comments completely in CSS2.1 mode.

The suggested modification to the lexer in respect of @charset described in http://www.w3.org/Style/css2-updates/CR-CSS21-20070719-errata.html is not radical enough.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>19637</commentid>
    <comment_count>2</comment_count>
    <who name="Yves Lafon">ylafon</who>
    <bug_when>2008-03-28 10:14:42 +0000</bug_when>
    <thetext>It would be relatively easy to parse only the strict version of CSS21, however the hard part here is to allow CSS2 constructs (&quot;@charset S* STRING S* ;) while managing to cope with the strict version.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>19640</commentid>
    <comment_count>3</comment_count>
    <who name="Yves Lafon">ylafon</who>
    <bug_when>2008-03-28 15:14:46 +0000</bug_when>
    <thetext>Fixed, all the test cases reporter are rejected as they should.
Also there is a special test to have the string starting with &quot; and not &apos;, per
http://www.w3.org/TR/CSS21/syndata.html#charset

Available on http://qa-dev.w3.org:8001/css-validator/
Thanks,</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>19652</commentid>
    <comment_count>4</comment_count>
      <attachid>543</attachid>
    <who name="Olivier Thereaux">ot</who>
    <bug_when>2008-03-31 14:55:10 +0000</bug_when>
    <thetext>Created attachment 543
test case</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>19653</commentid>
    <comment_count>5</comment_count>
      <attachid>544</attachid>
    <who name="Olivier Thereaux">ot</who>
    <bug_when>2008-03-31 14:55:39 +0000</bug_when>
    <thetext>Created attachment 544
test case 2</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>19654</commentid>
    <comment_count>6</comment_count>
      <attachid>545</attachid>
    <who name="Olivier Thereaux">ot</who>
    <bug_when>2008-03-31 14:56:00 +0000</bug_when>
    <thetext>Created attachment 545
test case 3</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>19723</commentid>
    <comment_count>7</comment_count>
      <attachid>546</attachid>
    <who name="Yves Lafon">ylafon</who>
    <bug_when>2008-04-03 14:06:45 +0000</bug_when>
    <thetext>Created attachment 546
simple quote for charset -&gt; fails</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>543</attachid>
            <date>2008-03-31 14:55:10 +0000</date>
            <delta_ts>2008-03-31 14:55:10 +0000</delta_ts>
            <desc>test case</desc>
            <filename>charset1.css</filename>
            <type>text/css</type>
            <size>48</size>
            <attacher name="Olivier Thereaux">ot</attacher>
            
              <data encoding="base64">QGNoYXJzZXQgLyoqLyJ1dGYtOCI7CgpwIHsgZm9udC13ZWlnaHQ6IGJvbGRlcjt9
</data>

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>544</attachid>
            <date>2008-03-31 14:55:39 +0000</date>
            <delta_ts>2008-03-31 14:55:39 +0000</delta_ts>
            <desc>test case 2</desc>
            <filename>charset2.css</filename>
            <type>text/css</type>
            <size>48</size>
            <attacher name="Olivier Thereaux">ot</attacher>
            
              <data encoding="base64">QGNoYXJzZXQvKiovICJ1dGYtOCI7CgpwIHsgZm9udC13ZWlnaHQ6IGJvbGRlcjt9
</data>

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>545</attachid>
            <date>2008-03-31 14:56:00 +0000</date>
            <delta_ts>2008-03-31 14:56:00 +0000</delta_ts>
            <desc>test case 3</desc>
            <filename>charset3.css</filename>
            <type>text/css</type>
            <size>48</size>
            <attacher name="Olivier Thereaux">ot</attacher>
            
              <data encoding="base64">QGNoYXJzZXQgInV0Zi04Ii8qKi87CgpwIHsgZm9udC13ZWlnaHQ6IGJvbGRlcjt9
</data>

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>546</attachid>
            <date>2008-04-03 14:06:45 +0000</date>
            <delta_ts>2008-04-03 14:06:45 +0000</delta_ts>
            <desc>simple quote for charset -&gt; fails</desc>
            <filename>test.css</filename>
            <type>text/css</type>
            <size>45</size>
            <attacher name="Yves Lafon">ylafon</attacher>
            
              <data encoding="base64">QGNoYXJzZXQgJ3V0Zi04JzsKCnAgeyBmb250LXdlaWdodDogYm9sZGVyO30K
</data>

          </attachment>
      

    </bug>

</bugzilla>