opera.beta
[Top] [All Lists]

Re: XML encoding guessing

Subject: Re: XML encoding guessing
From: Christoph Schneegans
Date: Tue, 06 Jun 2006 10:16:50 GMT
Newsgroups: opera.beta
"Spartanicus" wrote:

>> Why does 8414 render
>> <http://schneegans.de/sv/test-cases/?case=meta-only-encoding>? That
>> document is served as "application/xml", but is not well-formed XML
>
> It is well formed.

No, it isn't, see <http://www.w3.org/TR/REC-xml/#IDAY3EU>: "Unless an
encoding is determined by a higher-level protocol, it is also a fatal
error if an XML entity contains no encoding declaration and its content
is not legal UTF-8 or UTF-16." This rule is so self-evident.

>> However, Opera does not only ignore the well-formedness violation,
>> but also seems to pay attention to the "meta" element and uses
>> ISO-8859-1 encoding.
>
> Opera uses windows-1252, it ignores the meta element.

That's no proof. AFAIK, Opera _never_ uses ISO-8859-1 internally, at
least on the Windows platform. It assumes Windows-1252 even for
<http://schneegans.de/sv/test-cases/?case=control-characters> and decodes
0x80 to U+20AC, not U+0080.

-- 
All free men, wherever they may live, are citizens of Denmark. And
therefore, as a free man, I take pride in the words "Jeg er dansker!"

<Prev in Thread] Current Thread [Next in Thread>