Xerces SAX encoding problems

J

John Smith

I am trying to parse an XML document using SAX (xerces) but keep getting
org.xml.sax.SAXParseException: The encoding "windows-1252" is not supported.
How do I get the parser to either ignore the encoding or support it.

Thanks

Jon
 
R

Roedy Green

The encoding "windows-1252"

That is the default and canonical encoding used in Windows. You
spelled it correctly.

However, XML is an interchange format so refuses to let you use
platform-specific encodings. Try UTF-8, if you are writing.

If you are reading, and there truly are weird characters in there,
convert it first. See http://mindprod.com/applets/fileio.html
for how to read it into RAM and have 16-bit unicode.

If everything is vanilla 7-bit ASCII, you can call it UTF-8.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,982
Messages
2,570,186
Members
46,744
Latest member
CortneyMcK

Latest Threads

Top