Path: utzoo!utgpu!water!watmath!clyde!ima!haddock!karl From: karl@haddock.ISC.COM (Karl Heuer) Newsgroups: comp.lang.c Subject: Re: Character handling functions -- Jan 88, dpANS Keywords: isalpha islower isupper locale confusion Message-ID: <3223@haddock.ISC.COM> Date: 29 Mar 88 22:11:32 GMT References: <6192@dhw68k.cts.com> <7571@brl-smoke.ARPA> Reply-To: karl@haddock.ima.isc.com (Karl Heuer) Organization: Interactive Systems, Boston Lines: 18 In article <7571@brl-smoke.ARPA> gwyn@brl.arpa (Doug Gwyn (VLD/VMB) ) writes: >In article <6192@dhw68k.cts.com> david@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@haddock.isc.com), The Walking Lint