-
1. Re: column sortBy and locale settings
ilya_shaikovsky Nov 18, 2008 10:34 AM (in response to petercr4)you could debug the compare in our WrappedBeanComparator2 class. It should not be a problem of our sorting. Because simple standard String compare performed for String object.
-
2. Re: column sortBy and locale settings
petercr4 Nov 19, 2008 7:54 AM (in response to petercr4)Thanks Ilya for hint. Seems like problem is really with using standard String compare which is not good enough for non English languages. I made some manual sort on collections and instead of using code below
int i=o1.name.toUpperCase().compareTo(this.name.toUpperCase());
which doesn't work well, I used:
// get locale settings for collator
Collator myCollator = Collator.getInstance();
int i = myCollator.compare(o1.name.toUpperCase(), this.name.toUpperCase());
which works as supposed.
So collator should be used for sorting strings. Here is a good article on this subject:
http://blogs.sun.com/CoreJavaTechTips/entry/sorting_strings -
3. Re: column sortBy and locale settings
nbelaevski Nov 20, 2008 9:29 PM (in response to petercr4)Hi,
Thank you for pointing on that! I've created an issue: https://jira.jboss.org/jira/browse/RF-5008