SAXParser不懂编码'EUC-JP'

时间:2010-08-20 20:21:05

标签: c++

当解析以下文件

时,

sax解析器抛出异常

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

如果我删除第一行和日语字符行,则解析器可以正常工作。

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

任何想法如何使其适用于其他编码。

1 个答案:

答案 0 :(得分:0)

很难说不确定你正在使用什么SAX解析器。这有帮助吗?

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

相关问题