delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2001/02/03/20:02:35

Message-ID: <003001c08e2e$2af65380$2ef2883e@oemcomputer>
From: "Stephen Silver" <djgpp AT argentum DOT freeserve DOT co DOT uk>
To: <djgpp-workers AT delorie DOT com>
Subject: Re: stdint.h
Date: Sat, 3 Feb 2001 22:10:47 -0000
MIME-Version: 1.0
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 4.72.3110.1
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3
Reply-To: djgpp-workers AT delorie DOT com

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019