bug-libunistring
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug-libunistring] toCasefold?


From: Bruno Haible
Subject: Re: [bug-libunistring] toCasefold?
Date: Sun, 29 May 2011 12:03:30 +0200
User-agent: KMail/1.9.9

Simon Josefsson wrote:
> >> I'm looking for an implementation of the toCasefold(X) operation defined
> >> in Unicode 6.0 section 3.13 page 114 [1] like this:
> >> 
> >>   R4 toCasefold(X): Map each character C in X to Case_Folding(C).
> >> 
> >>   • Case_Folding(C) uses the mappings with the status field value “C” or
> >>     “F” in the data file CaseFolding.txt in the Unicode Character
> >>     Database.
> ...
> But does u32_casefold match Unicode toCasefold?  Is it possible to
> disable the SpecialCasing stuff?

SpecialCasing.txt applies to toUpper, toLower, toTitle mappings. For
toCasefold, all mappings are given in CaseFolding.txt, namely:
  - the locale independent mappings (type 'C' and 'F'),
  - the locale dependent mappings (type 'T') - this is similar to
    SpecialCasing.txt.

u32_casefold uses all of these mappings. And when you pass an empty string
as ISO639_LANGUAGE, it uses only the locale independent mappings (type
'C' and 'F'), hence it matches what toCasefold does.

Bruno
-- 
In memoriam John Penry <http://en.wikipedia.org/wiki/John_Penry>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]