delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2001/02/04/04:34:11

Date: Sun, 4 Feb 2001 11:31:57 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Stephen Silver <djgpp AT argentum DOT freeserve DOT co DOT uk>
cc: djgpp-workers AT delorie DOT com
Subject: Re: stdint.h
In-Reply-To: <003001c08e2e$2af65380$2ef2883e@oemcomputer>
Message-ID: <Pine.SUN.3.91.1010204111321.20547W-100000@is>
MIME-Version: 1.0
Reply-To: djgpp-workers AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Sat, 3 Feb 2001, Stephen Silver wrote:

> Also WINT_MIN should be -2147483648 rather than 0, since it's defined
> as int.

Thanks.

However, I'm not sure we need to push it as far as -2147483648.  wint_t 
should hold everything wchar_t does and WEOF.  C99 also seems to require 
that WINT_MIN is at most -32767, which seems to be sufficient both for 
wchar_t, which is unsigned short, and for WEOF, which is -1.

So what are the reasons for pushing WINT_MIN all the way to INT_MIN?

> > > (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.

Well, I _was_ talking about surrogates, specifically.  I was also talking 
about planes beyond plane 0, the BMP.

- Raw text -


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