Kaarle Kaila wrote:
And here is the command that fails if the xml-file is in UTF-8 and starts
with a Byte-Order-Mar (BOM)
...........
xmlReader.parse(new InputSource(getContentReader(filename)));
You should not use a Reader object because the UTF-8 decoder
that ships with Java does not know how to handle a BOM in a
UTF-8 stream. Instead, pass an InputStream to the parser and
let it detect the encoding and use its own UTF-8 Reader.
--
Andy Clark * [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]