Looks legal to me. According to the spec, "it is an error for an entity including an encoding declaration to be presented to the XML processor in an encoding other than that named in the declaration," where an error is, "A violation of the rules of this specification; results are undefined." So Microsoft's behavior is perfectly legal, and so is Xerces'. It's the document that's illegal.
 
-----Original Message-----
From: Boris Tarasyuk [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 31, 2001 1:49 PM
To: [EMAIL PROTECTED]
Subject: UTF-16 vs. UTF-8

Hi
I've got some concern about parser behavior
in case when input file encoded with UTF-16,
but coming with PI: <?xml version = "1.0" encoding = "UTF-8"?>.
MS Parses report error in this case. Xerces just doesn't parse file, because
every character, which equal 0, interpreted as EOF. 
 
Boris Tarasyuk
I4I

Reply via email to