After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 101900 - XPath and Xpointer do not support Chinese
XPath and Xpointer do not support Chinese
Status: VERIFIED NOTABUG
Product: libxml2
Classification: Platform
Component: general
2.4.25
Other Windows
: Normal normal
: ---
Assigned To: Daniel Veillard
Daniel Veillard
: 101929 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2002-12-24 07:09 UTC by lxl0621
Modified: 2009-08-15 18:40 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
An example (757 bytes, text/plain)
2002-12-25 01:43 UTC, lxl0621
Details

Description lxl0621 2002-12-24 07:09:20 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 .
Comment 1 Daniel Veillard 2002-12-24 10:11:50 UTC
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 ***
Comment 2 lxl0621 2002-12-25 01:43:16 UTC
Created attachment 13205 [details]
An example
Comment 3 Daniel Veillard 2002-12-25 10:39:00 UTC
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
Comment 4 Daniel Veillard 2002-12-25 10:56:48 UTC
*** Bug 101929 has been marked as a duplicate of this bug. ***