• 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
proper string ordering with ERXComparisonSupport
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

proper string ordering with ERXComparisonSupport


  • Subject: proper string ordering with ERXComparisonSupport
  • From: Samuel Pelletier <email@hidden>
  • Date: Wed, 19 Aug 2015 19:46:55 -0400

Hi,

I just discovered another very nice thing in Wonder I always wanted but already existed but did not know where as usual...

The default sort ordering of string uses the almost useless java String.compareTo. This put é after z but in french, we want é and e together. Java contains all the code to do it properly and even know about locales. I found mostly by accident the ERXComparisonSupport class with does the right thing and use the current localizer locale to get a proper collator.

The strange part is that this behaviour is not enabled by default and we need to add this somewhere in the app init code:

ERXComparisonSupport.initialize();

Does someone know why it is not enabled by default or why anybody would prefer the basic version from WebObjects ?

Samuel
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: proper string ordering with ERXComparisonSupport
      • From: Aaron Rosenzweig <email@hidden>
  • Prev by Date: Re: Recurring willUpdate Notifications Problem
  • Next by Date: Re: proper string ordering with ERXComparisonSupport
  • Previous by thread: Re: Recommendations for WO deployment system?
  • Next by thread: Re: proper string ordering with ERXComparisonSupport
  • Index(es):
    • Date
    • Thread