Re: rangeOfString behaves wierd
Re: rangeOfString behaves wierd
- Subject: Re: rangeOfString behaves wierd
- From: Mike Abdullah <email@hidden>
- Date: Mon, 09 Dec 2013 14:10:36 +0000
On 9 Dec 2013, at 10:38, Gerriet M. Denkmann <email@hidden> wrote:
>
> On 9 Dec 2013, at 16:53, Stephen J. Butler <email@hidden> wrote:
>
>> Would converting each string to NFD (decomposedStringWithCanonicalMapping) be an acceptable work around in this case?
> No, it would not. I am changing all my rangeOfString calls to use NSLiteralSearch, which does not have these strange effects.
You sure you want to do that? Have a look through http://en.wikipedia.org/wiki/Unicode_equivalence for some examples of combining characters. It is my understanding that NSLiteralSearch will do string comparison on raw unicode characters, and so potentially tell you that two runs of characters are not equal, even though they appear that way to the user.
_______________________________________________
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