W3C home > Mailing lists > Public > public-css-testsuite@w3.org > February 2009

RE: MS test suite at-charset-039 bug

From: Arron Eicholz <Arron.Eicholz@microsoft.com>
Date: Tue, 3 Feb 2009 08:16:56 -0800
To: Anne van Kesteren <annevk@opera.com>, "public-css-testsuite@w3.org" <public-css-testsuite@w3.org>
Message-ID: <66D5CB5D6AB0694592FAF5487C50368B299DEB0688@NA-EXMSG-C111.redmond.corp.microsoft.com>
Anne wrote:
> http://samples.msdn.microsoft.com/ietestcenter/css/chapter_4/Rules/at-charset-039.htm

> loads a style sheet that has no external character encoding metadata and
> has "Big5" in the @charset declaration. Even though the text has been
> encoded as UTF-8 decoding it as Big5 will still give meaningful results
> and since the UA never knows the original encoding no error handling in
> the form of ignoring the external style sheet should go into work here.

> Therefore the first selector in the external style sheet will not match,
> but the second one will, resulting in one green and one red piece of text
> on the page.

The test case is actually correct. The @charset does not match the encoding of the file which is UTF-8. In that case even though the @charset is parsed and is determined "as specified" it has to throw out the style sheet because the parser does not find an appropriate @charset at the beginning of the UTF-8 file.

Here is some of the text from section 4.4 bullet 1 under the table.

"If an encoding is detected based on one of the entries in the table above marked 'as specified'," the file is since it has '@charset "Big5"' (matches row 3 of the table). So far everything is fine...

"the user agent ignore the style sheet if it does not parse an appropriate @charset rule at the beginning of the stream of characters." This is where the file needs to get thrown out because the file itself is UTF-8 and the @charset is Big5. With that mismatch the @charset is not appropriate and the file is then thrown out completely.

--
Thanks,
Arron Eicholz
Received on Tuesday, 3 February 2009 16:17:38 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 20 September 2010 17:51:57 GMT