(08/28/09 05:25), Mark Logan-san wrote: > +#ifdef __sun > + return std::string(reinterpret_cast<const char *>(str.data()), > str.size()); > +#else > return Glib::convert(std::string(reinterpret_cast<const char > *>(str.data()), > str.size() * sizeof(wchar_t)), > "UTF-8", "WCHAR_T"); > +#endif
I'd recommend to use "UCS-4LE" instead of "WCHAR_T" for x86. You could check the behavior with iconv command. % iconv -f UTF-8 -t UCS-4LE utf8.txt > ucs4.txt mbstowcs() is also available.
