GNOME Bugzilla – Bug 101900
XPath and Xpointer do not support Chinese
Last modified: 2009-08-15 18:40:50 UTC
I use a Chinese xml file containing Chinese dtd file when I signature . For example,it is book.dtd: <!ELEMENT books (#PCDATA|Ãû×Ö|writer> <!ELEMENT Ãû×Ö (#PCDATA)> <!ELEMENT writer (#PCDATA)> I use "xmllint book.xml " in the libxml2 and type "xpath ancestor-or-self:: Ãû×Ö" ,the result is "xpath error Encoding error ". But if I type "xpath ancestor-or-self::writer" ,that is OK. There is the same problem in xpointer. I consider libxml2 cann't support Chinese when using xpath and xpointer Do you think so ?Can you reply me as possible as quickly? Thank you .
This is a duplicate of the previous bug report. There is no additional informations, I still need a complete example providing the content and the DTd and clearly indicating the encoding of the input, to try to reproduce the problem. There won't be progress made on this until I get a complete example. Daniel *** This bug has been marked as a duplicate of 101840 ***
Created attachment 13205 [details] An example
Well in that case the answer is what I already answered by mail, your doducment encoding is gb2312, as pointed already in http://xmlsoft.org/encoding.html the internal format is UTF-8. "Ãû×Ö" is the name of your tag in encoding="gb2312" And the XPath query MUST be expressed in encoding UTF-8 Convert "Ãû×Ö" to the UTF-8 equivalent and run your query again. Aparently there is no bug, Daniel
*** Bug 101929 has been marked as a duplicate of this bug. ***