Dean Hiller wrote:

"in the above cases".....but isn't that a catch 22. How can you read what encoding it is, if you don't know what encoding it is?

I never wrote an XML parser, but I would assume that the basic rules are: Read the first four or so bytes to identify an encoding family (upwards compatible to US-ASCII, EBCDIC, UTF-16, ...). These first bytes are also sufficient to detect whether an XML declaration is present. (Always the case for EBCDIC, UTF-16, ...)

If an XML declaration is present, continue to read the declaration, including the optional "encoding" attribute, which specifies the family member.


Jochen

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to