[ansi-test-devel] both-case-p and Unicode titlecase?

Raymond Toy toy.raymond at gmail.com
Fri Apr 16 16:09:40 UTC 2010


On 4/16/10 9:43 AM, Sam Steingold wrote:
> On 4/16/10, Raymond Toy <toy.raymond at gmail.com> wrote:
>   
>> What do other implementations do with characters like
>>  Greek_Capital_Letter_Omega_With_Prosgegrammeni?
>>
>>  In cmucl, this character is both-case-p, but is not lower-case-p and is
>>  not upper-case-p.  Instead, it is title-case-p.  char-downcase returns
>>  #\Greek_Small_Letter_Omega_With_Ypogegrammeni.
>>     
> [1]> #\Greek_Capital_Letter_Omega_With_Prosgegrammeni
> #\GREEK_CAPITAL_LETTER_OMEGA_WITH_PROSGEGRAMMENI
> [2]> (both-case-p #\Greek_Capital_Letter_Omega_With_Prosgegrammeni)
> T
> [3]> (char-downcase #\Greek_Capital_Letter_Omega_With_Prosgegrammeni)
> #\GREEK_SMALL_LETTER_OMEGA_WITH_YPOGEGRAMMENI
> [4]> (char-upcase #\Greek_Capital_Letter_Omega_With_Prosgegrammeni)
> #\GREEK_CAPITAL_LETTER_OMEGA_WITH_PROSGEGRAMMENI
> [5]> (lower-case-p #\Greek_Capital_Letter_Omega_With_Prosgegrammeni)
> NIL
> [6]> (upper-case-p #\Greek_Capital_Letter_Omega_With_Prosgegrammeni)
> T
> [7]> (char-upcase #\GREEK_SMALL_LETTER_OMEGA_WITH_YPOGEGRAMMENI)
> #\GREEK_CAPITAL_LETTER_OMEGA_WITH_PROSGEGRAMMENI
> [8]>
>
>   
Yeah, that's probably because you make title-case mean upper-case. 
CMUCL follows Unicode where that character has the title-case property
and not the uppercase property.  I suppose CMUCL could make both-case-p
return NIL for this character because it there's a lower case but no
upper case (but does have titlecase).

Ray





More information about the ansi-test-devel mailing list