[ http://nagoya.apache.org/jira/browse/XERCESC-1275?page=history ]
     
Alberto Massari closed XERCESC-1275:
------------------------------------


> How to work with Polish characters
> ----------------------------------
>
>          Key: XERCESC-1275
>          URL: http://nagoya.apache.org/jira/browse/XERCESC-1275
>      Project: Xerces-C++
>         Type: Wish
>   Components: DOM
>     Versions: 2.5.0
>  Environment: Windows 2000, Visual C++
>     Reporter: G S

>
> 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 
> &#261; b c &#263; d e &#281; f g h i j k l &#322; m n &#324; o ó p r s &#347; 
> t u w y z &#378; &#380;</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

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://nagoya.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]

Reply via email to