[Building Sakai] Filenae sorting in Sakai 2

Adam Marshall adam.marshall at oucs.ox.ac.uk
Fri Apr 16 01:34:28 PDT 2010


re the typo - I thought you'd gone all Scottish: http://www.bumperart.com/ProductImages/2004072002_Display-35.gif

I cant imagine anybody is going to notice the subtle change in file ordering let alone complain about it. For me there'd be a huge win in sorting not being case sensitve / i18n working better and teeny tiny miniscule loss with 'Windows' sorting going out of the, er, window.

adam 

| -----Original Message-----
| From: David Horwitz [mailto:dhorwitz at gmail.com] On Behalf Of David
| Horwitz
| Sent: 15 April 2010 18:09
| To: Adam Marshall
| Cc: sakai-dev; i18n at collab.sakaiproject.org
| Subject: Re: [Building Sakai] Filenae sorting in Sakai 2
| 
| 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 sakai-dev mailing list