RE: MS test suite at-charset-039 bug

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 UTC