tags:

views:

13

answers:

1

sax parser throws exception when I parse following file

<?xml version='1.0' encoding='EUC-JP'?>
<note>
  <to>George</to>
  <from>John</from>
  <heading>Reminder</heading>
  <body>·Ñ³meeting</body>
</note>

If I remove first line and line with Japanese characters then parser works.

<note>
  <to>George</to>
  <from>John</from>
  <heading>Reminder</heading>
</note>

Any idea how to make it work for other encodings also.

A: 

Hard to say without knowing for sure what SAX parser you're using. Does this help?

http://www.lllf.uam.es/~antonio/documentos/xerces/faq-parse.html#faq-20

Steve Jessop