xerces-c-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Bertoni <dbert...@apache.org>
Subject Re: Reading german umlaute from xml file
Date Fri, 25 Jul 2008 19:57:14 GMT
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

Mime
View raw message