Mail Archives: djgpp-workers/2001/02/03/20:02:35
Eli Zaretskii wrote:
> > > +#define WCHAR_MAX 32767
> >
> > WCHAR_MAX should be 65535, since wchar_t is defined as an unsigned short
> > in sys/djtypes.h
>
> You are right. Thanks for catching this.
Also WINT_MIN should be -2147483648 rather than 0, since it's defined
as int.
> > (and it will need to hold values higher than 32767 if it is ever to
> > be used for Unicode).
>
> 64K isn't enough for Unicode anyway, only for the BMP.
Section 5.2 of the Unicode Standard disagrees with you, as it
talks about using wchar_t for Unicode, and makes it clear that
a 16-bit wchar_t is quite sufficient. Unicode is designed to
be 16-bit - that's why it has surrogate pairs.
Stephen
- Raw text -