xerces-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Bertoni <dbert...@apache.org>
Subject Re: Reading UNICODE character
Date Fri, 11 Aug 2006 18:08:01 GMT
Mannion, Enda wrote:
> Hi,
> 
> I am reading a tag called XX from an XML file, this code works ok when 
> XX is and ASCII character but when it is a UNICODE char like € I get 
> problems.

First of all, I'd like to suggest you direct questions about _using_ 
Xerces-C to the Xerces-C user list, rather than the developer list.

> 
> Nothing is returned just an empty string, when reading the UNICODE 
> character. I can write the UNICODE character to the XML file without any 
> problems but there is an issue with reading.

Axel explained this to you yesterday.  You cannot guarantee that every 
Unicode character can be represented in your system's local code page.  If 
it cannot, then using XMLString::transcode() will fail, and you will end up 
with an empty string.

Since you haven't told us why you're transcoding from UTF-16 to the local 
code page, it's difficult for anyone to offer you useful suggestions. 
Yesterday, I commented that you might want to try UTF-8, instead of the 
local code page, but that may or may not be helpful, depending on your needs.

Dave

---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org


Mime
View raw message