Re: diacritical "rangeOfString:options:" option ?
Re: diacritical "rangeOfString:options:" option ?
- Subject: Re: diacritical "rangeOfString:options:" option ?
- From: glenn andreas <email@hidden>
- Date: Mon, 9 May 2005 08:16:13 -0500
On May 9, 2005, at 7:58 AM, Aurélien Hugelé wrote:
i have 2 NSStrings, the first one is @"Hôpital" (note the ô symbol
used in french for example). I would like to make
rangeOfString:options: returns something different than an NSNotFound
location when i pass the string @"Hop", without the diacritical mark
ok i've tried CoreFoundation call CFStringFind() but that does not
work too !!
CFRange CFStringFind (
CFStringRef theString,
CFStringRef stringToFind,
CFOptionFlags compareOptions
);
kCFCompareNonliteral
Specifies that loose equivalence is acceptable, especially as pertains
to diacritical marks. For example, “ö” represented as two distinct
characters (“o” and “umlaut”) is equivalent to “ö” represented by a
single character (“o-umlaut”). Note that this is not the same as
diacritic insensitivity.
this seems *exactly* what i want, but this does not work in Tiger :
Because it's isn't exactly what you want. Note that
kCFCompareNonliteral "is not the same as diacritic insensitivity" and
what you want _is_ diacritic insensitivity.
There is a kUCCollateDiacritInsensitiveMask as an option for the Carbon
Unicode string comparisons (see UCCompareText)
Glenn Andreas email@hidden
<http://www.gandreas.com/> oh my!
quadrium | build, mutate, evolve | images, textures, backgrounds, art
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden