Freimann, Mario wrote:
Dear mailing list users,

I have a xml file I want to process with xerces. I now have a problem with 
german umlaute. I extracted the code I use to show the problem. After reading 
the mailing list I switched from XMLString::transcode to a utf8 transcoder, but 
it doesn't work either. The problematic platform is Red Hat Enterprise Linux (3 
32Bit and 5 64Bit). The XMLString transcode works well on a Solaris 10 
platform, the transcoder doesn't work, too. Xerces version is 2.7 linked 
statically.
...

        utf8Transcoder = 
XMLPlatformUtils::fgTransService->makeNewTranscoderFor("UTF-8", failReason, 
16*1024);
        utf8Transcoder->transcodeFrom( (XMLByte*)childNode->getNodeValue(), 
XMLString::stringLen( childNode->getNodeValue() ), xmlChars, 1024, eaten, charSizes );

If you're trying to transcode from UTF-16, which is what you have, to UTF-8, you need to call "transcodeTo()" not "transcodeFrom()".

Dave

Reply via email to