🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #4294

Re: Character classifications

#4294
From: walter briscoe
Date: Sat, 28 Oct 1995 12:41
38 lines
1880 bytes
In article <814819779snz@soliton.demon.co.uk>
           ian@soliton.demon.co.uk "Ian Cargill" writes:

> The description of isupper says:
> 
>  The isupper function tests for any character that is an
>  uppercase letter or is one of an implementation-defined set
>  of characters for which none of iscntrl, isdigit, ispunct,
>  or isspace is true.
> 
> and islower has similar wording.
> 
> By my reading of this, a character could be both upper-case and 
> lower-case at the same time.  Questions are:
> 
> 1. Am I missing something?
> 
> 2. Is this deliberate?  I wouldn't have thought any language 
>    would have characters which are both upper and lower case. 

Latin did not have case as an attribute of its letters; nor, from a
quick look at the book, does Bengali.

I can imagine locales for both of these languages which would return
either true or false for both isupper and islower when presented with
letters.

From the definition of isalpha, I think isalpha, islower, and isupper
need to be simultaneously true in reasonable locales for both languages.

It's not an easy matter and demonstrates some of the difficulties
involved in i18n - internationalization - of C. You might also like to
consider toupper on the double s letter in German. One lower case letter
maps to two upper case letters. There used to be a similar letter in
English which was printed as a cursive "f".

-- 
walter briscoe
Technical Details
Message-ID: <814884085snz@wbriscoe.demon.co.uk>
Path: arc1-ca.pugleaf.net!mail2news.demon.co.uk!wbriscoe.demon.co.uk
References: <814819779snz@soliton.demon.co.uk>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!mail2news.demon.co.uk!wbriscoe.demon.co.uk
From: walter briscoe <walter@wbriscoe.demon.co.uk>
Newsgroups: comp.std.c
Subject: Re: Character classifications
Date: Sat, 28 Oct 95 12:41:25 GMT
Message-ID: <814884085snz@wbriscoe.demon.co.uk>
References: <814819779snz@soliton.demon.co.uk>
Reply-To: walter@wbriscoe.demon.co.uk
X-NNTP-Posting-Host: wbriscoe.demon.co.uk
X-Newsreader: Demon Internet Simple News v1.30