[whatwg] Charset sniffing from XML prolog

Boris Zbarsky bzbarsky at MIT.EDU
Wed Oct 7 19:10:33 PDT 2009


On 10/7/09 9:52 PM, Kartikaya Gupta wrote:
> Anything else that might be affecting this?

In general, yes.  Charset info can come from the HTTP cache, from user 
bookmarks, etc, etc.

In this case, though, it's totally my fault: I just forgot that I had 
the HTML5 parser turned on locally.  Turning that off, I do get UTF-8, 
because of 
http://hg.mozilla.org/mozilla-central/file/603759afc77a/parser/htmlparser/src/nsParser.cpp#l2553 
and following.  That code is just bogus, in my somewhat biased 
opinion.... ;)

-Boris



More information about the whatwg mailing list