std::string and unicode
Alec Ross
alec at arlross.demon.co.uk
Tue Apr 8 07:31:27 PDT 2008
Hi,
std::string is simply a typedef for a specialisation of the class
template std::basic_string, instantiated for the char type. Similarly
wstring is the same template class instantiated for wchar_t.
The wide char type would, I guess help with some aspects of unicode -
but it is not designed to support unicode as such.
HTH
Alec
In message <mailman.27.1207662690.19501.wx-users at lists.wxwidgets.org>,
Declan McMullen <declan.mcmullen at gmail.com> writes
>Hi Guys,
>I'm slightly confused about something. Does std::string not support
>unicode ?
>I have stl enabled in my wxwidgets compilation. The reason I did it is
>because
>I have some backend classes that use std::string and I didnt want to be
>converting to
>and from std::string to wxString. Turning on stl meant my strings could be
>interchangeable.
>
>However I want to work with locales so I went to use the unicode build of
>wx widgets, this
>however fails to allow me to have interchangeable strings.
>
>So if I want to use unicode will I have to use wxString and perform a
>conversion?
>
>I've been looking through the internationalization section of the book but
>i've ended up confused :)
>
>Any guidance much appreciated.
--
Alec Ross
More information about the wx-users
mailing list