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 702 - BOM not recognized for file upload
Summary: BOM not recognized for file upload
Status: RESOLVED LATER
Alias: None
Product: CSSValidator
Classification: Unclassified
Component: upload file (show other bugs)
Version: CSS Validator
Hardware: Other other
: P2 normal
Target Milestone: ---
Assignee: Philippe Le Hegaret
QA Contact: qa-dev tracking
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-05-05 22:40 UTC by Bj
Modified: 2004-10-27 12:45 UTC (History)
0 users

See Also:


Attachments
BOM and ruleset (24 bytes, text/css; charset=UTF-8)
2004-10-27 12:26 UTC, Etan Wexler
Details
BOM and @media at-rule (47 bytes, text/css; charset=UTF-8)
2004-10-27 12:36 UTC, Etan Wexler
Details

Description Bj 2004-05-05 22:40:30 UTC
Message-ID: <4095D6EB.3070606@iinet.net.au>
Date: Mon, 03 May 2004 15:21:47 +1000
From: Lachlan Hunt <lachlan.hunt@iinet.net.au>
To: www-validator-css@w3.org
X-Archived-At: http://www.w3.org/mid/4095D6EB.3070606@iinet.net.au

Hi,
   I tried validating some CSS files that have been saved as utf-8, 
however the validator issued the following error.

     * Line: 0 Context : 

       Parse Error - @charset "UTF-8";

   Even if I remove the @charset rule, I still get a similar error 
message.  The error appears to be caused by the presence of the utf-8 BOM.
Comment 1 Etan Wexler 2004-10-27 12:26:48 UTC
Created attachment 377 [details]
BOM and ruleset
Comment 2 Etan Wexler 2004-10-27 12:36:14 UTC
Created attachment 378 [details]
BOM and @media at-rule
Comment 3 Etan Wexler 2004-10-27 12:45:36 UTC
<http://jigsaw.w3.org/css-validator/validator?uri=http%3A%2F%2Fwww.w3.org%2FBugs%2FPublic%2Fattachment.cgi%3Fid%3D377%26action%3Dview&usermedium=all>
...is fine.

<http://jigsaw.w3.org/css-validator/validator?uri=http%3A%2F%2Fwww.w3.org%2FBugs%2FPublic%2Fattachment.cgi%3Fid%3D378%26action%3Dview&usermedium=all>
...raises an error.

According to CSS 2.1, this is exactly as it should be. The BOM (byte-order mark,
U+FEFF) is not distinguished in the scanner from any other character outside of
the Latin-1 repertoire. Thus the BOM starts an identifier, which starts a rule set.

CSS3 will probably change the regulations to account for the special meaning of
a BOM.