xerces-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ram <ram1...@yahoo.com>
Subject XMLString::transcode() + japanese string + ABR
Date Sat, 09 Jul 2005 18:39:33 GMT
Hi,

Using xerces-c 2.5 (with ICU 2.4) I am reading some 
japanese characters from a XML file and passing them
to some othe functions. The  file is proper with
japanese characters. I am able to view it properly on
a japanese PC from Internet Explorer. So its content
is valid input.

  I am using following calls.
  char *cstr =
XMLString::transcode(leafnode->getNodeValue());
string str = cstr OR string str =
string(cstr,strlen(cstr));
-- Purify shows a Array bound read of 4 bytes on above
line.
strlen(cstr) returns 40
XMLString::stringLen(leafnode->getNodeValue()) returns
22. 

It seems that transcode is returning a string which is
not properly null terminated. I am getting some junk
characters appended to actual value.
 
The above code works fine on Windows & RH7.3. I am
facing this issue only on RH9 & Solaris.
(LC_CTYPE points to en_US.UTF-8 )

Has anybody faced similar problem before ?

Thanks for your time.

-> Ram


		
__________________________________ 
Do you Yahoo!? 
Yahoo! Mail - Helps protect you from nasty viruses. 
http://promotions.yahoo.com/new_mail

---------------------------------------------------------------------
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