xerces-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sandip shahane <sandipshah...@yahoo.com>
Subject Re: Reading UNICODE string
Date Thu, 10 Aug 2006 18:30:32 GMT
I have  a question on similar line 
I want to know, is there any kind of wstring
support with xerces? My application is intended to use
wstring based class (It is must since all code base
that was earlier on windows is using wstring, and now
i want to port it to other platforms of UNIX). Also it
shall support I18 viz. foreign language character set
e.g. japanese etc... For this I am doing as below:

I have seen XMLString examples at
some places that does ::transcode(...) to and fro
XMLCh * to char * . If possible my strategy is to use
this way to get char * from xerces's XMLCh * and
convert it back to wstring using wcstombs and vice
versa.
What does this transcode(...) do? Will I be able to
support non-english (say japanese character set) do as
above.?

Has anybody done this way, any issues, or
alternatives?
because i think this is going to be too expensive.
Is there any better way? Or has anybody used any other
simpler way? If so, some sample code will be greatly
helpful.


Thanks,
Sandeep Shahane

--- David Bertoni <dbertoni@apache.org> wrote:

> Mannion, Enda wrote:
> > Thanks Again Axel,
> > 
> > Can you suggest a solution to me so I can read and
> write as Unicode?
> > 
> 
> Why don't you just write the UTF-16 data into the
> file?  As long as you are 
> reading and writing the data on a single platform,
> or you remember whether 
> it's big-endian or little-endian, it should work.
> 
> If you want an encoding that's more compatible with
> non-Unicode 
> applications, then you can transcode to UTF-8.
> 
> Dave
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> c-dev-unsubscribe@xerces.apache.org
> For additional commands, e-mail:
> c-dev-help@xerces.apache.org
> 
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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