• 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: diacritical "rangeOfString:options:" option ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >diacritical "rangeOfString:options:" option ? (From: Aurélien Hugelé <email@hidden>)
 >Re: diacritical "rangeOfString:options:" option ? (From: Aurélien Hugelé <email@hidden>)

  • Prev by Date: Re:Include external jar
  • Next by Date: Re: plain text and Spotlight
  • Previous by thread: Re: diacritical "rangeOfString:options:" option ?
  • Next by thread: Solved:Conversion from CMBitmap to NSBitmapImageRep
  • Index(es):
    • Date
    • Thread