Date: Sun, 8 Feb 1998 13:50:42 +0200 (IST) From: Eli Zaretskii To: Vik Heyndrickx cc: DJ Delorie , djgpp-workers AT delorie DOT com Subject: Re: char != unsigned char... sometimes, sigh In-Reply-To: <34DAC2A1.7E06@rug.ac.be> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk On Fri, 6 Feb 1998, Vik Heyndrickx wrote: > Yes, very wrong: > The ANSI standard requires that the is* macros work for any int value in > the range of "unsigned char" and for EOF. The anding was primarily used > to turn the values in the signed char range into the unsigned char > range. Negative numbers from the signed char range do not belong to the unsigned char range. People who use signed char for characters with ASCII code beyond 127 write buggy code; they should use unsigned char instead. I agree that it would be nice to have the ctype functions/macros support the cases such as `(char)0x84', but if that support causes the library to break ANSI compliance, and no viable solution could be found, I have no problems with unsupporting it.