Output wxString as UTF8
Milan Babuskov
milanb at panonnet.net
Thu Sep 28 09:51:54 PDT 2006
Hello,
I have a string (which is in current system encoding) and I wish to
output it to the textual file in UTF8 format. What would be the
appropriate way to convert wxString from current system encoding to UTF8?
I need it to work in both Unicode and Ansi builds.
I've read the wxMBConv and wxCSConv docs, and also searched the Internet
but I am confused. It seems I need to use temporary buffers and stuff
and that there isn't a straightforward way to say something like this:
// string in current system enconding
wxString input;
wxString output(wxConvCurrent.Convert(input, wxConvUTF8));
or something like that.
--
Milan Babuskov
http://swoes.blogspot.com/
http://www.flamerobin.org
More information about the wx-users
mailing list