Frank
Using CodeWarrior Pro 5, wchar_t is two bytes not one byte. I am sure that
CodeWarrior Pr 4 also had this as well.
________________________________________________________________________
Gary L. Wade
Microsoft Corporation | Voice: 972-633-3318
500 N. Central Expressway | Fax: 972-509-2422
Suite 202 | E-Mail: a-gwade@microsoft.com
Plano, TX 75074 | Mobile: 214-642-6883
-----Original Message-----
From: ftang@netscape.com [mailto:ftang@netscape.com]
Sent: Tuesday, November 02, 1999 10:59 PM
To: Unicode List
Cc: Unicode List
Subject: Re: FW: FW: unicode character on Different Unix platforms ....
I know wchar_t on Mac is 1 byte.
Hemant Ramnani wrote:
> Hi,
> Can you please tell me on which platforms is wchar_t 1 byte..
> Let me know this as soon as possible, as I might go on the wrong track
then.
>
> Thank you.
>
> Hemant. Ramnani
> Member of Techincal Staff,
> Persistent Systems Private Limited.
> Email : hemant@pspl.co.in <mailto:hemant@pspl.co.in>
> Tele. : 5676700 ( Ext. 467 )
> : 653109 ( R )
>
> -----Original Message-----
> From: Valeriy E. Ushakov [mailto:uwe@ptc.spbu.ru]
> Sent: Wednesday, November 03, 1999 12:36 AM
> To: Unicode List
> Subject: Re: FW: unicode character on Different Unix platforms ....
>
> On Tue, Nov 02, 1999 at 10:10:34AM -0800, schererm@us.ibm.com wrote:
>
> > ANSI C defines wchar_t as an abstract type for "wide" characters but
does
> > not specify a concrete type nor a character set for it. On some
platforms,
> > it is Unicode, on others, it is a scalar form of the platform default
> MBCS.
> [...]
> > Relying on wchar_t to be anything fixed across platforms will not work.
It could even be 4 bytes. I work with SVR 4.0 curses on MNLS 1991. It is
possible it is 4 byte for wchar_t. In particular, for Trad Chinese.
>
>
> Moreover, implementations with 1 byte wchar_t are perfectly conformant,
> so using wchar_t for Unicode is *definitely* a bad idea.
>
> >From ISO C9X draft:
>
> 5.2.4.2.1 Sizes of integer types <limits.h>
>
> [#1] The values given below shall be replaced by constant
> expressions suitable for use in #if preprocessing
> directives. ................................................
> ........... Their implementation-defined values shall be
> equal or greater in magnitude (absolute value) to those
> shown, with the same sign.
>
> [...]
>
> - maximum number of bytes in a multibyte character, for
> any supported locale
> MB_LEN_MAX 1
>
> SY, Uwe
> --
> uwe@ptc.spbu.ru | Zu Grunde kommen
> http://www.ptc.spbu.ru/~uwe/ | Ist zu Grunde gehen
This archive was generated by hypermail 2.1.2 : Tue Jul 10 2001 - 17:20:54 EDT