Juliusz,

> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of Juliusz Chroboczek
> Sent: Monday, September 10, 2001 2:12 PM
> To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subject: Re: Encoding conversions
>
>
> > wchar_t is a very wrong thing to normalize to, because it is OS and
> > locale dependent.

I know that it is OS dependent but how is it locale dependent?

>
>   #ifdef __STDC_ISO_10646__
>     typedef whar_t uchar_t;
>   #else
>     typedef unsigned long uchar_t;
>   #endif
>

I think you meant:

     typedef wchar_t uchar_t;

There are another rationales for defining you own.  First it make it easier
to port to another platform.  I have defined UChar32, UChar16, and UChar8.
Second if you use a re-definition like UChar8 for all UTF-8 code it will
make sure that you use unsigned char consistently and not just char.  This
is something that will also bite you especially with different compilers.

Carl



-
Linux-UTF8:   i18n of Linux on all levels
Archive:      http://mail.nl.linux.org/linux-utf8/

Reply via email to