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 4828 - Unicode BOM at beginning of file not stripped, causes parse errors
Summary: Unicode BOM at beginning of file not stripped, causes parse errors
Status: RESOLVED FIXED
Alias: None
Product: CSSValidator
Classification: Unclassified
Component: Parser (show other bugs)
Version: CSS Validator
Hardware: All All
: P2 major
Target Milestone: ---
Assignee: This bug has no owner yet - up for the taking
QA Contact: qa-dev tracking
URL: http://jigsaw.w3.org/css-validator/au...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-06-28 00:46 UTC by Olivier Thereaux
Modified: 2008-02-29 14:49 UTC (History)
0 users

See Also:


Attachments

Description Olivier Thereaux 2007-06-28 00:46:54 UTC
A lot if windows-world editors tend to prepend a BOM to unicode files, and the CSS parser of the validator does not appear to strip the BOM. 

In some cases (especially when stylesheet starts with @media ) it causes a parse error and false invalidation. In other cases it only adds spurrious characters to the output.
Comment 1 Olivier Thereaux 2007-06-28 00:57:35 UTC
examples:
http://jigsaw.w3.org/css-validator/autotest/testsuite/bugs/4828-bom_atmedia.css
has a BOM at the beginning, starts with @media
=> parse error Parse Error - ���@media screen

http://jigsaw.w3.org/css-validator/autotest/testsuite/bugs/4828-bom_notatmedia.css
has a BOM, starts with body selector
=> source display has garbage characters
Comment 2 Olivier Thereaux 2008-02-29 14:49:43 UTC
In the soon-to-be-released development version, which uses a different template engine for the display and the tagsoup parser, this looks fixed.
http://qa-dev.w3.org:8001/css-validator/