DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6122>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6122 DOMString::transcode() maybe have something wrong, Summary: DOMString::transcode() maybe have something wrong, Product: Xerces-C++ Version: 1.6.0 Platform: PC OS/Version: Windows NT/2K Status: NEW Severity: Normal Priority: Other Component: DOM AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] Xerces-C++ version number��IBM XML4C 4.0 (Including Xerces-C++ and ICU 2.0) Platform : Intel PC Operating system and version number :Microsoft Window 2000 Server 5.00 .2195 Service Pack 2 ,Simple Chinese version Compiler and version number :Microsoft Visual Studio c++ 6.0 (VC6),Service Pack 5 The XML document (or excerpt) that failed :see attachment The C++ application code that failed : { DOMString nodeValue =tId.item(0).getNodeValue(); char* hehe=nodeValue.transcode(); //Error under XML4c4,but ok under XML4c3.5 ,if english all is ok cout<<"From transcode"<<hehe<<endl; //nodeValue.print(); unsigned long lent = nodeValue.length(); gFormatter->formatBuf(nodeValue.rawBuffer(),lent, XMLFormatter::CharEscapes); //ok } Whether you built the Xerces-C++ library yourself or used the binary distribution : NO What happened : { I update my program from XML4c3.5 to XML4c4.0.No compile or link Error,but Some error occurs: there is one file nanmed test.xml and this file have a element named <CustomerID> and its value is "��������20020130". After Parsing this file,i print the value in this DOM tree,it print "�������� 2002" that lose the last four character. After some tests,i find that the node value will lost the same amount character of the node value containing chinese characters.XML file's Encoding is "gb2312". And under XML4c3.5,all is right.If there is no chinese characters ,all is right under XML4c3.5 and XML4c4.0. i can get right output of chinese characters by using "gFormatter->formatBuf (nodeValue.rawBuffer(),lent, XMLFormatter::CharEscapes);" The same error occurs when I do the same test with "MemParse Sample",Encoding is gb2312. } Following is my test XML MeM: { char* gXMLInMemBuf = "\ <?xml version='1.0' encoding=\"gb2312\"?>\n\ <CustomerCollection>\n\ <Customer>\n\ <CustomerID>��������20020130</CustomerID>\n\ <CustName>���ܾ�</CustName>\n\ </Customer>\n\ <Customer>\n\ <CustomerID>���ķ���dfildlf</CustomerID>\n\ <CustName>���ܾ�</CustName>\n\ </Customer>\n\ </CustomerCollection>\n\ "; --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
