Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

ISO8859_1 Encoding

 
Guruprasad Kateel
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
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(XMLParser.java:1213)
at org.apache.xerces.readers.DefaultEntityHandler.startReadingFromDocument(DefaultEntityHandler.java:546)
at org.apache.xerces.framework.XMLParser.parseSomeSetup(XMLParser.java:314)
at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1097)
at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:195)
at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:122)

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
Prasad
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I believe you mean "ISO-8859-1" encoding...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic