Eric Hodges wrote:
> That's odd, since the document can be parsed if I remove the encoding
> directive and the single Unicode character I added to test it.  Any ideas for
> finding the error in the document that only shows up when I try to use UTF-16
> encoding?

My guess would be pilot error. Sometimes people confuse the
encoding declaration with actually changing the encoding of
the entire document. Loading a document into an editor and
adding an XMLDecl line (<?xml ...?>) does *not* mean that
the document is now in that encoding, even if you paste the
appropriate UTF-16 bytes into it. 

You need to *save* the document using the specified encoding. 
Notepad in Win2K (and higher) has encoding options in the
Save As... dialog that allow you to select UTF-8 and UTF-16
as the encoding to save as. [Note: Saving a UTF-8 file on
Windows has the odd behavior of prepending a byte-order mark
(BOM) to the beginning of the file. This is strictly not
needed and may foul up some applications (and some parsers)
that can't handle a UTF-8 BOM. I can understand why they do
it though -- so they can autodetect the difference between
UTF-8 files and files in the default encoding, usually 
Windows 1252.]

-- 
Andy Clark * [EMAIL PROTECTED]

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

Reply via email to