(08/29/09 05:10), Mark Logan-san wrote:
> I have a question, are you suggesting I change it to this for all
> platforms, or just for Sun Solaris:?
Actually I don't check the codes with details. WCHAR_T has a platoform
dependent.
If the code is used in GNU Linux, WCHAR_T is UCS-4LE with locale dependencies.
If the code is used in MS-Windows, WCHAR_T is UCS-2LE but not UCS-4LE.
I meant I recommend UCS-4LE if you can change. But if the maintainer likes
WCHAR_T, I think it's better to use UCS-4LE for Solaris only than remove
iconv lines.
The "WCHAR_T" is defined in gconv(GNU iconv) and not defined in libiconv.
Probably the following is my suggestion:
#ifdef __GNU_LIBRARY__
return Glib::convert (foo, "UTF-8", "WCHAR_T");
#else
return Glib::convert (foo, "UTF-8", "UCS-4LE");
#endif
>
> return Glib::convert(std::string(reinterpret_cast<const char
> *>(str.data()),
> str.size() * sizeof(wchar_t)),
> "UTF-8", "UCS-4LE");
>
> Thanks,
> Mark
>
>