On Sat, Jun 02, 2001 at 02:28:35PM -0700, H. Peter Anvin wrote:
> Followup to: <[EMAIL PROTECTED]>
> By author: "Michael B. Allen" <[EMAIL PROTECTED]>
> In newsgroup: linux.utf8
> >
> > > > 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.
I would advise you against using UCS-2, as it is only a partial
solution. Use UCS-4 instead. It has recently been approved in ISO
to add characters in ISO 10646 beyond the 64 k.
Kind regards
Keld
-
Linux-UTF8: i18n of Linux on all levels
Archive: http://mail.nl.linux.org/linux-utf8/