Bugzilla – Bug 18396
Encoding Sniffing Algorithm: Add an XML check as a step zero
Last modified: 2015-06-16 10:17:52 UTC
Proposal: Extend the encoding sniffing algorithm by adding a new,
explicit step zero, like so:
0. If the document is an XML document, abort these steps.
By extending the algorithm this way, then there is an *explicit*
step to 'jump out of the algorithm if XML' - for which it would also be
possible write test cases.
Currently, and especially if the XML document lives in a 'nested
browsing context', then (unless there is a BOM) some browsers let
the XML doc default to the encoding of the 'parent browsing context'
instead of letting it default to the default encoding of the XML format
(UTF-8). Webkit/Chromium/Opera have this error. Firefox do not have
this error. I did not test IE9/10 yet, but suspect they are more on
Firefox' side. Regarding defaulting to the encoding of the parent
browsing context, then [see bug #foo and see bug #bar]
More data in my related blog post.
Making this a higher priority to actively seek more feedback on from implementers and webdevs.