Date: Mon, 9 Feb 1998 13:37:08 +0100 (MET) From: Hans-Bernhard Broeker To: Eli Zaretskii cc: Vik Heyndrickx , djgpp workers list Subject: Re: char != unsigned char... sometimes, sigh In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk On Sun, 8 Feb 1998, Eli Zaretskii wrote: > For me, ANSI compliance is the main concern. Anything else is > secondary to it. If the current version is not ANSI-compliant, IMHO > it should be fixed ASAP. > However, making untrivial changes with global consequences, such as > switching to unsigned char by default, just to make buggy code > magically turn correct is not my idea of a small change in a minor > release. As usual, Eli expressed my very thoughts in much clearer words than I did :-) > > > In the 'C' locale: probably no. But who knows: maybe there is some locale > > > that has actually quenched a printable character into this position? Well, > > > on looking it up: there is! According to a Linux man page, 0xff is 'LATIN > > > SMALL LETTER Y WITH DIAERESIS' in ISO-Latin-1. So in that locale, > > > 'isgraph(0xff)' should return 1, and our implementation can't do that :-( > The issue with non-C locales doesn't belong to this discussion. > AFAIK, a non-C locale will need to override the ctype functions > anyway, if only to deal with non-English capital letters which have > ASCII codes beyond 127. It should *always* be enough to just provide a different set of tables and re-vector a pointer to them on a 'setlocale()' call. (The current implementation uses the arrays themselves directly, but that could be changed easily). For the macros, that's also the only possible implementation at the same time, as you can't redefine a macros at run-time. Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de) Even if all the snow were burnt, ashes would remain.