UTF-16 encoding
1 answer
In this case, this is not the XML parser you are using, see section 2.2 of the xml specification :
All XML processors MUST accept UTF-8 and UTF-16 Unicode encodings
XML xml parsers usually get their input wrapped in an InputSource object. This can be built using the Reader parameter, which performs decoding of characters for a given encoding.
InputStream in = ... InputSource is = new InputSource(new InputStreamReader(in, "utf-16")); For a "utf-16" charset, the stream should begin with a byte order sign; if it is not, use "utf-16le" or "utf-16be".
+5