[WG: I18N & L10N] [Building Sakai] Filenae sorting in Sakai 2

David Horwitz david.horwitz at uct.ac.za
Thu Apr 15 10:09:12 PDT 2010


Hi

(just noticed the horrific typo in the title). Using collator the list
bellow would look like

file1
file01
file10
file2
...


There is no util or commons class that I've found that does it properly
and all example code I've seen at best approximates this behavior and
ignores the possible i18n cases. If you know of one I'd like to know of it.

David

On 04/15/2010 06:53 PM, Adam Marshall wrote:
> so what order would the list below be in if we used java.text.Collator ? 
>
> Aren't there other alternatives like stuff from java.util?
>
> adam 
>
> | -----Original Message-----
> | From: sakai-dev-bounces at collab.sakaiproject.org [mailto:sakai-dev-
> | bounces at collab.sakaiproject.org] On Behalf Of David Horwitz
> | Sent: 15 April 2010 15:13
> | To: sakai-dev; i18n at collab.sakaiproject.org
> | Subject: [Building Sakai] Filenae sorting in Sakai 2
> | 
> | Hi All,
> | 
> | I was looking into:
> | http://jira.sakaiproject.org/browse/KNL-467
> | 
> | In which Matthew Buckett reported that sorting of files and folders in
> | contentHosting is case sensitive. I looked into this also aware that
> | there are i18n problems with many sorting methods in Sakai. Now the
> | sort
> | method is designed to mimic Windows explorer and Mac finder when it
> | comes to sorting files with numbers in the names:
> | 
> | file
> | file01
> | file1
> | file02
> | file2
> | file10
> | 
> | The sorting should also be case insensitive. Now I can see no easy to
> | fix the case problem in the sort method or make it obey locale specific
> | sort rules. Both of these can be done by using java.text.Collator in
> | the
> | process eliminating 50 lines of Sakai code, but we then loose the
> | sortign behaviour described above.
> | 
> | What do people think?
> | 
> | David
> | _______________________________________________
> | sakai-dev mailing list
> | sakai-dev at collab.sakaiproject.org
> | http://collab.sakaiproject.org/mailman/listinfo/sakai-dev
> | 
> | TO UNSUBSCRIBE: send email to sakai-dev-
> | unsubscribe at collab.sakaiproject.org with a subject of "unsubscribe"
>   


More information about the i18n mailing list