proper string ordering with ERXComparisonSupport
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