0

I have an issue, I'm fetching some XML through a WS, which are not well formatted. The XML header comes with an encoding="UTF8" which the SAXparser doesn't understand.

I have an open source project to process the message which I really don't want to reconfigure because of the license, etc.

So is it possible to map Java when it comes to a UTF8 definitions just to map it to an another one, let's say UTF-8?

James Dunn
  • 8,064
  • 13
  • 53
  • 87
  • maybe the SAXparser does understand ANSI http://stackoverflow.com/questions/11218461/how-to-convert-an-utf-string-to-ansi-and-create-an-ansi-text-file-in-ssd-with-ja or another encoding. – bas Jul 30 '13 at 14:17
  • 1
    Provide a Reader to the parser, an `InputStreamReader(is, "UTF-8")`. – Joop Eggen Jul 30 '13 at 14:19
  • As to your question, Charset deals with a canonical name and aliases. But if the SAX parser does not go that way... – Joop Eggen Jul 30 '13 at 14:23

0 Answers0