> > Why doesn't wchar_t play nice with Unicode?
>
> It does, if your C implementation defines the macro name
> __STDC_ISO_10646__ (see the C standard for additional information).
No. It doesn't regardless of how the C99 macro is set. AFAICT you cannot
convert from wchar_t to an arbitrary encoding without going through a
7 or 8 bit locale dependant encoding such as UTF-8 or IS0-8859-1. For
example, if I have a lot of UCS-2 code and want to use wchar_t functions
like wprintf I must first convert the string to UTF-8 using iconv and
then again to wchar_t * with mbstowcs.
Mike
-
Linux-UTF8: i18n of Linux on all levels
Archive: http://mail.nl.linux.org/linux-utf8/