Character handling functions -- Jan 88, dpANS

Karl Heuer karl at haddock.ISC.COM
Wed Mar 30 08:11:32 AEST 1988


In article <7571 at brl-smoke.ARPA> gwyn at brl.arpa (Doug Gwyn (VLD/VMB) <gwyn>) writes:
>In article <6192 at dhw68k.cts.com> david at dhw68k.cts.com (David H. Wolfskill)
>>[voices his concerns about isalpha() != (islower() || isupper())]
>
>Yes, this is right.  Not all character sets have a meaningful concept
>of "case".  (Consider Chinese.)  Instead of arbitrarily picking either
>lower or upper (or both), the implementor can simply tell the truth.

I agree that it's good to allow for such neither-case letters, but both-case?
Is it really intentional to allow isupper() and islower() to be simultaneously
true?

On a related note, I can see where it might be useful for me to define a
locale which reflects the native alphabet only, specifically excluding the
C-locale alphabet.  (E.g. I might want isalpha('w') to be false.)  The dpANS
doesn't allow this.  Why not?

Karl W. Z. Heuer (ima!haddock!karl or karl at haddock.isc.com), The Walking Lint



More information about the Comp.lang.c mailing list