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:38:40 -0800
To: Anne van Kesteren <annevk@opera.com>, "public-css-testsuite@w3.org" <public-css-testsuite@w3.org>
Message-ID: <66D5CB5D6AB0694592FAF5487C50368B299DEB06AF@NA-EXMSG-C111.redmond.corp.microsoft.com>
Anne van Kesteren wrote:
> <Arron.Eicholz@microsoft.com> wrote:
> > 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.

> But it is nowhere declared to be UTF-8 so the browser does in fact not  
> know the encoding.

The style sheet encoding is defined by the encoding of the referring file. (in this case the HTML document).

> > 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.

> How does the browser know it is UTF-8? As far as I can tell the only  
> information the browser has is that it is Big5.

It has the encoding of the parent file which is UTF-8.

--
Thanks,
Arron Eicholz



Received on Tuesday, 3 February 2009 16:39:34 GMT

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