• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: rangeOfString behaves wierd
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: rangeOfString behaves wierd


  • Subject: Re: rangeOfString behaves wierd
  • From: Quincey Morris <email@hidden>
  • Date: Mon, 09 Dec 2013 00:56:31 -0800

On Dec 9, 2013, at 00:22 , Gerriet M. Denkmann <email@hidden> wrote:

> but I have great difficulties imagining a place on this world where = is the same as ≠.

> NSDiacriticInsensitiveSearch  →	"见≠見" (3 shorts) occurs in "见=見見" (4 shorts) at {0, 3}

The latter suggests that the bar across the equals sign might be regarded as a diacritic. In that sense, it might be something similar to an ‘i’ and a dotless ‘i’. In both cases, there might be *some* justification for regarding the characters as equal in a non-literal search.

Interestingly, this page:

> http://www.fileformat.info/info/unicode/char/fa0a/index.htm


shows 0xfa0a “decomposing” to 0x898b, which if technically correct may well have some effect on the results you’re seeing.

Clearly, there’s a bug, in at least the range returned by your original example. It’s unclear whether the match is also a bug.

On Dec 9, 2013, at 00:30 , Gerriet M. Denkmann <email@hidden> wrote:

> NSLog(@"%s %@",__FUNCTION__, [ currentLocale localeIdentifier]);
> prints: en_IE


> Explicit specifying en_US (as probably the best tested and debugged) makes no difference.


I meant you should try the locale of the language (Japanese?) to which the characters belong.

_______________________________________________

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


References: 
 >rangeOfString behaves wierd (From: "Gerriet M. Denkmann" <email@hidden>)
 >Re: rangeOfString behaves wierd (From: Quincey Morris <email@hidden>)
 >Re: rangeOfString behaves wierd (From: "Gerriet M. Denkmann" <email@hidden>)

  • Prev by Date: Re: rangeOfString behaves wierd
  • Next by Date: Re: rangeOfString behaves wierd
  • Previous by thread: Re: rangeOfString behaves wierd
  • Next by thread: Re: rangeOfString behaves wierd
  • Index(es):
    • Date
    • Thread