Message: A new issue has been created in JIRA.
--------------------------------------------------------------------- View the issue: http://issues.apache.org/jira/browse/XERCESC-1275 Here is an overview of the issue: --------------------------------------------------------------------- Key: XERCESC-1275 Summary: How to work with Polish characters Type: Wish Status: Unassigned Priority: Major Project: Xerces-C++ Components: DOM Versions: 2.5.0 Assignee: Reporter: G S Created: Wed, 22 Sep 2004 3:25 AM Updated: Wed, 22 Sep 2004 3:25 AM Environment: Windows 2000, Visual C++ Description: I have a string which contains Polish characters but when I tried to get a Document Element, a NULL is returned. However without Polish characters I get a vaild pointers. I have UTF-8 as the encoding but still it does not work. I would like to know how to get a valid Document Element pointer if my string contains Polish or for that matter any language characters. Any input to solve this would be great. I have attachment the code-snippet below: //unsigned char s1[] = "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\" ?><abc><xyz>Hello</xyz><klm>We will rock u</klm><polish>a ą b c ć d e ę f g h i j k l ł m n ń o ó p r s ś t u w y z ź ż</polish></abc>"; unsigned char s1[] = "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\" ?><abc><xyz>Hello</xyz><klm>We will rock u</klm><polish>xxxxx</polish></abc>"; XMLCh xmlchEncodingMode[100]; XMLString::transcode("UTF-8", xmlchEncodingMode, 99); XMLCh *xmlValue ; xmlValue = XMLString::transcode((char*)s1); XMLString::trim(xmlValue); MemBufInputSource *pInputSource = new MemBufInputSource(s1, strlen((char*)s1),(char*)0); pInputSource->setSystemId(xmlValue); pInputSource->setEncoding(xmlchEncodingMode); Wrapper4InputSource InputSourceWrapper(pInputSource); doc = parser->parse(InputSourceWrapper); DOMElement *pNode = doc->getDocumentElement(); Thanx GS --------------------------------------------------------------------- JIRA INFORMATION: This message is automatically generated by JIRA. If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]