Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

XML Parsing using Java Xerces SAX parser

843834Jun 28 2009
Hello All,

We have a SAX parser(Xerces Java Implementation) that we use to parse a XML file. All our input XML files are 'UTF-8' encoded.We find that the parsing fails on Solaris and it goes through if the encoding is set explicitly to 'UTF-8' for the SAX parser. The same parsing seems to work fine on Windows OS without any explicit setting of encoding.
I would like to know what is the default encoding used by Xerces SAX Parser ?. Does it simply use the default encoding provided by the JVM when Xerces starts up?.
The 'file.encoding' property in Solaris is set to 'ASCII' whereas in Windows it is showing as 'cp1252'. Does this explain the behavior of the Xerces parser ?

Any pointers will be appreciated.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 26 2009
Added on Jun 28 2009
0 comments
203 views