Re: [xml-dev] BOM and encodings questions

From
David Carlisle <>
To
Date
2007-03-08T17:46:22Z
ID
<>
Thread
Re: [xml-dev] BOM and encodings questions
> it is fairly easy to implement a parser that is able to handle
> alternating encoding that can support such cases, but I couldn�t
> find this mentioned anywhere in the standard(s). 

It's not supported, each external entity must be in a single encoding.
If you use a text/xml mime type the encoding of the document might be
changed in transit by a text encoder that knows nothing about the xml
structure, so it would be very difficult to allow encoding switches mid
document, even if that were desired.

> I get to see a lot of XML documents that contain alternating encodings
> -- are they not well formed? 

They may not be well formed, or they may be well formed but refer to
characters that the author of the document did not intend.

David