Re: rangeOfString behaves wierd
Re: rangeOfString behaves wierd
- Subject: Re: rangeOfString behaves wierd
- From: "Gerriet M. Denkmann" <email@hidden>
- Date: Mon, 09 Dec 2013 15:22:00 +0700
On 9 Dec 2013, at 15:05, Quincey Morris <email@hidden> wrote:
> On Dec 8, 2013, at 23:46 , Gerriet M. Denkmann <email@hidden> wrote:
>
>> NSString *b = @"见≠見"; // 0x89c1 0x2260 0x898b
>
> So what are the results with:
>
>> NSString *b = @"见”;
>> NSString *b = @"≠”;
>> NSString *b = @"見”;
> ?
>
> And what’s the current locale? Does specifying an explicit locale make any difference?
I don't know (but might test later) - but I have great difficulties imagining a place on this world where = is the same as ≠.
But then, there are people who have "believed as many as six impossible things before breakfast.” Maybe I just need practicing.
What does make a difference are options:
NSLiteralSearch → behaves as expected
NSDiacriticInsensitiveSearch → "见≠見" (3 shorts) occurs in "见=見見" (4 shorts) at {0, 3}
all others: (excluding NSRegularExpressionSearch which does not apply; including no options) get:
"见≠見" (3 shorts) occurs in "见=見見" (4 shorts) at {0, 4}
Kind regards,
Gerriet.
_______________________________________________
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