W3C home > Mailing lists > Public > public-css-bugzilla@w3.org > November 2012

[Bug 19882] @charset rule logic is not case insensitive & should state ASCII interpretation for clarity

From: <bugzilla@jessica.w3.org>
Date: Tue, 06 Nov 2012 16:30:13 +0000
To: public-css-bugzilla@w3.org
Message-ID: <bug-19882-5148-SqPy6ZapIG@http.www.w3.org/Bugs/Public/>

--- Comment #2 from Zack Weinberg <zackw@panix.com> ---
The relevant code in Firefox is css::Loader::GetCharsetFromData, here:
It only allows lowercase "charset", it doesn't allow single-quoted strings, the
@ must be the first character in the document, and there must be exactly one
space before the initial " character and none between the closing " and the
semicolon.  I would consider the first two of these flat-out bugs in Firefox

I am not as familiar with Webkit, but the relevant code _appears_ to be
TextResourceDecoder::checkForCSSCharset, here:
 This also does case-sensitive matching as far as I can tell, but it allows
both single- and double-quoted strings, and it allows arbitrary whitespace
before and after the string.  The @ still has to be the first character in the

Later today I will put together a comprehensive test case and find out what IE
and Opera do.

You are receiving this mail because:
You are the QA Contact for the bug.
Received on Tuesday, 6 November 2012 16:30:19 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:36:40 UTC