File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes XML and Related Technologies and the fly likes ISO8859_1 Encoding Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "ISO8859_1 Encoding" Watch "ISO8859_1 Encoding" New topic

ISO8859_1 Encoding

Guruprasad Kateel

Joined: Jul 10, 2003
Posts: 16
We have a requirement to parse an xml string having an encoding style "ISO8859_1" using a xalan dom parser. While parsing the xml, an exception is thrown indicating this encoding style is not supported:
org.xml.sax.SAXParseException: The encoding "ISO8859_1" is not supported.
at org.apache.xerces.framework.XMLParser.reportError(
at org.apache.xerces.readers.DefaultEntityHandler.startReadingFromDocument(
at org.apache.xerces.framework.XMLParser.parseSomeSetup(
at org.apache.xerces.framework.XMLParser.parse(
at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(
at javax.xml.parsers.DocumentBuilder.parse(

Should i use a different parser which supports this style, or should i remove the encoding sytle from the xml string before parsing?
Thanks in Advance
Lasse Koskela

Joined: Jan 23, 2002
Posts: 11962
I believe you mean "ISO-8859-1" encoding...

Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
I agree. Here's the link:
subject: ISO8859_1 Encoding
jQuery in Action, 3rd edition