using unicode strings in ansi build

Alexander Vassilev avasilev at voipgate.com
Sat Aug 5 14:51:06 PDT 2006


Hello Vadim,

> AV> I would like to know if it is possible to use unicode wx-strings in an 
> AV> ansi build.
>
>  No, wxString uses char in ANSI build.
>
>   
Yes, I meant if there is another class that is always wide char.
> AV> I need this because I am using utf8 strings which i have to 
> AV> process and convert them to Geck widechar strings.
>
>  However you can use wxMBConv stuff available in ANSI build as well
> (provided you didn't turn off wxUSE_WCHAR_T) and this should be all you
> need.
>
>   
Yes, that is what I will use to convert from UTF-8 to wide char, but 
then i need to store the widechar strings in some string class and do 
some processing, this is what i am looking for.
> AV> with wx-strings or i have to use STL strings?
>
>  Standard wstring class won't help you at all as it doesn't support UTF-8.
>
>   
So what I am intending to do is to convert from utf-8 encoded  ANSI wx 
strings to widechar using wxConvUTF8 and store the resulting strings in 
std::wstring.

Thank you for the fast response.

Best regards
Alex




More information about the wx-users mailing list