You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-users@xalan.apache.org by Jasmine_Shaikh <ja...@infosys.com> on 2010/09/03 08:40:56 UTC

Re: Problem:Unicode string causing transcode(..) crashes in External Function

Hi Dave,

Thanks for your quick reply and apologies for replying late. 
We had tried using XalanTranscodingServices::makeNewTranscoder() before, but
maybe we were passing some wrong arguments into it, it didn't work. I think
it should work.
We have actually solved the issue using another method to create transcoder
XMLPlatformUtils::fgTransService->makeNewTranscoderFor
to make transcoder for the required encoding. I guess you had suggested both
the methods in one of your previous posts. Anyways thanks for your guidance.

Regards,
Jasmine Shaikh




David Bertoni wrote:
> 
> On 8/19/2010 12:30 AM, Jasmine_Shaikh wrote:
>>
>> Hi Dave,
>>
>> We have a similar problem here while using transcode in our external
>> function. It throws the TranscodingError for strings in East Asian
>> Languages. Our function actually encodes the XalanDOMString, for which we
>> need to get std::string from XalanDOMString. Similar to what you said I
>> have
>> read it at many places that its not good to transcode to the local code
>> page, but I could not find any other method of Xalan that gives me a C
>> string.
>>
>> Could you please provide any suggestions regarding this.
> You should transcode to UTF-8. Create a transcoder using 
> XalanTranscodingServices::makeNewTranscoder(). Transcode the data into a 
> char buffer, then use that buffer to construct a std::string instance.
> 
> Dave
> 
> 

-- 
View this message in context: http://old.nabble.com/Problem%3AUnicode-string-causing-transcode%28..%29-crashes-in-External-Function-tp19878741p29611556.html
Sent from the Xalan - C - Users mailing list archive at Nabble.com.