Re: localizedCompare: with Thai
Re: localizedCompare: with Thai
- Subject: Re: localizedCompare: with Thai
- From: Deborah Goldsmith <email@hidden>
- Date: Wed, 15 Apr 2009 19:13:25 -0700
Or does it follow some rule like: "The order of consecutive
Nonspacing_Marks does not matter" ?
For Thai, that's correct. The Thai collation tailoring forces
normalization.
See: http://unicode.org/cldr/data/common/collation/th.xml
(You'll need to "view source" if you look at that in Safari.)
Deborah Goldsmith
Apple Inc.
email@hidden
On Apr 15, 2009, at 6:48 PM, Gerriet M. Denkmann wrote:
On 16 Apr 2009, at 06:01, Deborah Goldsmith wrote:
Yes, it's correct behavior. localizedCompare: compares logically,
not visually.
If you did a diacritic-insensitive compare, they would compare
equal, because MAI EK is primary ignorable.
But then: why does localizedCompare: think "KO KHAI, SARA II, MAI
EK" = "KO KHAI, MAI EK, SARA II" ?
Or does it follow some rule like: "The order of consecutive
Nonspacing_Marks does not matter" ?
Kind regards
Gerriet
Deborah Goldsmith
Apple Inc.
email@hidden
On Apr 15, 2009, at 12:13 AM, Gerriet M. Denkmann wrote:
This is the logical order of the Thai word for "low":
THAI CHARACTER TO TAO, THAI CHARACTER MAI EK, THAI CHARACTER SARA AM
and this is the order usually used in writing (bottom to top):
THAI CHARACTER TO TAO, THAI CHARACTER SARA AM, THAI CHARACTER MAI
EK.
Both strings look (at least in 10.5.6) identical - with the MAI EK
correctly on top of SARA AM.
But localizedCompare: thinks that they are not (i.e. does not
return NSOrderedSame).
Is this correct?
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden