Philippe Verdy, Tue, 27 Nov 2012 15:39:43 +0100:
> I've never said that user agents had to "'write" the prolog. It's the
> reverse: yes authors have to write a prolog (but the prolog is perfect here
> so this is not the fault of the author).

XML has (or more correctly: can have) a prolog. HTML does not have a 
prolog. Now to the million dollar question: is your page in question 
XML or HTML?  Answer: Per the Content-Type, then it is HTML (that is: 
"text/html"). Next question: Does the XML prolog have any effect when 
the XML file (more specifically: the XHTML file) is served as HTML 
(that is: "text/html")? 

The answer is that, per HTML5, it does not have effect. And of course, 
per HTML4, it does not have effect. As for XHTML 1, then it cannot 
really regulate what is supposed to happen in text/html. The 
problem/challenge, hover is that some Web browsers - such as W3m (a 
text browser), Chrome, Opera and Safari - *do* look at the prolog for 
encoding info *also* when served as HTML. But Firefox and Internet 
Explorer do not. Which is according the HTML5 specification.

My guess is that it will *never* become conforming to use the XML 
prologue in HTML files. However, that does not necessarily prevent 
Firefox from looking at the prologue for encoding info, when *that* is 
the only source of encoding info. In fact, I think the HTML5 encoding 
sniffing algorithm already permits this (since it it has a step which 
roughly says "if the user agent have other sources of information".)

So, for what it is worth - and with reference to your pages, I filed a 
bug against Firefox, to make it start to use the encoding declartion of 
the XML prologue, when nothing else is available: 
https://bugzilla.mozilla.org/show_bug.cgi?id=815279
-- 
leif halvard silli

Reply via email to