[EMAIL PROTECTED] wrote:
> Xerces can certainly read UTF-8 encoded XML documents directly; it also
> should have no problems with character streams, so long as the JVM had
> enough information to encode the characters correctly.

And if Neil's guess is correct and you are making an InputStream
from a String, then most likely you are either 1) stripping the
high bits (8-16) from the characters which would be disasterous;
or 2) possibly having the system use the default locale setting
transparently and returning a series of bytes that then may not
match the XMLDecl in the original file.

You can read the file directly by specifying the URI location of
the file. ("c:\\xml\\document.xml" is not a URI, btw.) Or you
can create an InputStream from the file and let the parser auto-
detect the encoding and parse it appropriately. Or even still,
if you have it as a String already, use the java.io.StringReader
class. All of these options work but unless we know more about
what you're doing, we don't know why you're experiencing these
problems.

-- 
Andy Clark * IBM, TRL - Japan * [EMAIL PROTECTED]

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

Reply via email to