QT3 读XML文件 显示汉字问题 高手请帮帮忙
<?xml version="1.0" encoding="GB2312"?>
<LIST>
<NODE value="2001">
<LANGUAGE value="en">
<content value="content2001"></content>
<cause value="cause2001"></cause>
<measure value="measure2001"></measure>
</LANGUAGE>
<LANGUAGE value="ch">
<content value="内容2001"></content>
<cause value="原因2001"></cause>
<measure value="处理2001"></measure>
</LANGUAGE>
</NODE>
<NODE value="2002">
<LANGUAGE value="en">
<content value="content2002"></content>
<cause value="cause2002"></cause>
<measure value="measure2002"></measure>
</LANGUAGE>
<LANGUAGE value="ch">
<content value="内容2002"></content>
<cause value="原因2002"></cause>
<measure value="处理2002"></measure>
</LANGUAGE>
</NODE>
</LIST>
...
QDomNode n = nlst.item(i);
n.toElement().attribute("value");
...
...
QTextCodec *gbk_codec = QTextCodec::codecForName("GBK");
node.content = gbk_codec->toUnicode(n.toElement().attribute("value"));
...