wchar_t values

Keld J|rn Simonsen keld at login.dkuug.dk
Sun Mar 31 05:20:34 AEST 1991


erik at sra.co.jp (Erik M. van der Poel) writes:

>ANSI C says the following about wchar_t:

>    ... an integral type whose range of values can represent distinct
>    codes for all members of the largest extended character set specified
>    among the supported locales; the null character shall have the code
>    value zero and each member of the basic character set defined in 2.2.1
>    shall have a code value equal to its value when used as the lone
>    character in an integer character constant.

Note that there are problems with this; for all the multibyte
standard character sets that I know of, L'c' is not equal to 'c' .
ISO 10646, JIS X 0208, GB 2312 and KSC 5601 all have a value of L'c'
different from ASCII 'c'. 

WG14 has got a comment with respect to this from SC2, and we are
working to see if we can solve this problem.

Another problem present in the above is that "the null character"
shall have the value zero. The NUL character in ISO DIS 10646
does not have this value, but then the ANSI/ISO C  has different 
meaning with the term "null character", it means the string terminator
and does not have a direct relation to the SC2 "NUL character".

Keld Simonsen
member of ISO/IEC JTC1/SC22/WG14



More information about the Comp.std.c mailing list