Hi,
      Thanks for your quick reply. I have fixed the issue. The corruption was happening bcoz transcode wasnt able to do the conversion of unicode chars which were non shiftJIS on machine with default locale as japanese.
By using XMLTranscoder::transcodeFrom I was able to convert and save the data as expected.
Also one can copy UTF8 encoded data to c++ string class. This is what I was doing.

Thanks and regards,
Kaustubh


On Sun, 02 Apr 2006 Gareth Reakes wrote :
>Hey again,
>
>I think I know what is happening. It seems I am a bit slow today. You are declaring a string and trying to set it to 0xffee. This wont work. If you want to do this then do something like
>
>const XMLCh chSwappedUnicodeMarker  = XMLCh(0xFFFE);
>
>(from XMLUniDefs). When you transcode like you are, you are doing it from your local code page (prob win 1252). In your local code page each character is assigned a value and when xerces transcodes into UTF16 it looks up the translation. There is no translation (or its not what you expect) because the character either does not exist in your local code page, or if it does, the value you have set the string to is not the value of the character in your local code page. If you work directly with the XMLCh you will not have this problem.
>
>Cheers,
>
>Gareth
>
>
>
>
>-- Gareth Reakes, Managing Director          Embrace Mobile
>+44-1865-811197              http://www.embracemobile.com
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>



Reply via email to