GNOME Bugzilla – Bug 101840
Can libxml2 recoginise dtd in Chinese?
Last modified: 2009-08-15 18:40:50 UTC
when i signatured a xml file containing DTD file,it will fail if the DTD file contains Chinese . So I consider that the signature cannot recognise a Chinese DTD file so that the signature cannot process the Chinese xml file.For example: <!ELEMENT books (#PCDATA|名字|writer> <!ELEMENT 名字 (#PCDATA)> <!ELEMENT writer (#PCDATA)> I asked aleksey and he tell me to ask you .He considered in libxml2 I will find the reseason.Can you tell me how to process DTD including Chinese word? Please answer me as quickly as possible . Thanks a lot.
Libxml2 should provide support for chinese unicode characters assuming the encoding is recognized. Provide a full example, and attach it to the bug report. See http://xmlsoft.org/bugs.html for instructions, especially I want something reproductible with xmllint. Cut and paste from this bug report will not work for chinese character, so there is no useful informations in this current report. Daniel
*** Bug 101900 has been marked as a duplicate of this bug. ***
Not a bug apparently. The XPath queries were encoded in gb2312 and not UTF-8. The byte sequence for the name is #E5#90#8D#E5#AD#97 and not "Ãû×Ö" in UTF-8. paphio:~/tmp -> xmllint --debug tst.xml DOCUMENT version=1.0 encoding=gb2312 URL=tst.xml standalone=true DTD(book), SYSTEM book.dtd ELEMENT book TEXT content= ELEMENT #E5#90#8D#E5#AD#97 TEXT content=#E4#B9#A6#E5#90#8D TEXT content= ELEMENT writer TEXT content=lxl TEXT content= Daniel