This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 5582 - Validator accepts @charset even with grammar CSS1 selected
Summary: Validator accepts @charset even with grammar CSS1 selected
Status: RESOLVED FIXED
Alias: None
Product: CSSValidator
Classification: Unclassified
Component: CSS 1.0 (show other bugs)
Version: CSS Validator
Hardware: PC Windows XP
: P2 normal
Target Milestone: ---
Assignee: This bug has no owner yet - up for the taking
QA Contact: qa-dev tracking
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-03-20 13:16 UTC by CecilWard
Modified: 2009-02-17 11:40 UTC (History)
1 user (show)

See Also:


Attachments

Description CecilWard 2008-03-20 13:16:20 UTC
The validator incorrectly reports "VALID" for the following fragment with grammar=CSS1 explicitly selected.

@charset "utf8";

Should report INVALID, surely?
Comment 1 Olivier Thereaux 2008-03-31 14:52:42 UTC
I am a tad ambivalent about this one.

On the one hand, you are right, there is no @charset syntax in REC-CSS1.

On the other hand the message coming from the CSS working group these days is that REC-CSS1 is obsoleted and that CSS Level 1 is the combination of features from the CSS1 spec with definitions from the CSS21 spec, which I read as "use the grammar, syntax and at-rules from CSS21". 

As such I don't know if we should be marking @charset as errors in the Level 1 profile. I'm wondering however how the validator is currently treating the @charset syntax for Level 1 though, as the test cases for Bug 5581 are giving odd validation results. I suppose this may just "fix itself" if we actually move forward with the idea of using a single "base" for grammar, syntax and at-rules...
Comment 2 Yves Lafon 2009-02-17 11:40:22 UTC
The machinery is there to parse and use @charset, however it makes no sens to report CSS1 validity when a normal CSS1 only parser would choke on it (like for some multi-bytes encodings).
As a result, @charset is now sending an error in the case of CSS1
(that needs to be localized)