• 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: -[NSString localizedCompare:] - example of semantic difference with compare?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: -[NSString localizedCompare:] - example of semantic difference with compare?


  • Subject: Re: -[NSString localizedCompare:] - example of semantic difference with compare?
  • From: Deborah Goldsmith <email@hidden>
  • Date: Tue, 21 Mar 2006 19:07:16 -0800

Well, many languages -- like French and Danish -- have a basic collation order that's different from English, so if you don't use localizedCompare: your sort will be in the wrong order for users speaking those languages. Those users will consider your application to be broken. If you want to see a language that's *really* different from English, try setting your sort order to "Hawaiian" in International Preferences, then look at a Finder listing.

Sorted data that is intended to be shown to end users should always be sorted using localizedCompare:.

Deborah Goldsmith
Internationalization, Unicode liaison
Apple Computer, Inc.
email@hidden

On Mar 21, 2006, at 6:50 PM, Jim Correia wrote:

In the English locale, a -localizedCompare: uses different case folding semantics than compare:.

Does anyone have a concrete example of any other semantic differences between the two, either in the English locale, or others? Perhaps showing why users would expect or prefer the localized compare result?

Thanks,
Jim

_______________________________________________
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

_______________________________________________ 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: 
 >-[NSString localizedCompare:] - example of semantic difference with compare? (From: Jim Correia <email@hidden>)

  • Prev by Date: Re: Tables created in code have different row height from those created in IB
  • Next by Date: NSString: localizedCaseInsensitiveCompare + NSNumericSearch?
  • Previous by thread: -[NSString localizedCompare:] - example of semantic difference with compare?
  • Next by thread: Re: -[NSString localizedCompare:] - example of semantic difference with compare?
  • Index(es):
    • Date
    • Thread