Page 1 of 1

Sorting question (Config/Sort method)

Posted: 2006-11-01, 15:31 UTC
by wanderer
"Strictly by numeric character code" has one good thing. It places all items starting with underscores at the bottom of the list. "Natural sorting: alphabetical and numbers" is the best way to use though but does not place underscores at the bottom. Is there a way for those two to be combined?

No more, no sum…

Posted: 2006-11-02, 06:46 UTC
by Clo
2wanderer

:) Hello !

• This is related to the SortUpper=… INI entry, of course.

- AFAIK, there is not any flag for that entry able to sort like you wish… and it doesn't support a sum-number as flag.

:mrgreen: KR
Claude
Clo

Posted: 2006-11-02, 06:58 UTC
by m^2
I think there should be an option of defining custom sorting. This would also solve a problem with national characters placing.

Posted: 2006-11-02, 09:02 UTC
by wanderer
m^2 wrote:I think there should be an option of defining custom sorting. This would also solve a problem with national characters placing.
That would be nice but it would require Christian to write himself an extended sorting routine which i think would be very complicated (if you also include NaturalSorting into it). I'm almost sure what i ask cannot be done without such a routine but i'm checking, just in case.

Posted: 2006-11-02, 09:30 UTC
by m^2
No, it's not so hard, you only have to change comparison function due to user specification. There should be some predefined character classes (i.e. letters /numbers/ "!@#$%...") and user defined characters, placed in proper order, so definition would look similar to
[Sort]
s1=NUMBERS
s2=a..s
s3='ś';'Ś'
s4=t..z
s5=OTHERS
s6='_'
Parsing such list is quite easy to do in linear time, it will hardly ever be noticably slower.

Posted: 2006-11-02, 09:49 UTC
by wanderer
m^2 wrote:No, it's not so hard, you only have to change comparison function
From what i've understood, Christian is using some external sorting (IE6?) functions for some sorting methods (like NaturalSorting). Your idea means that he would spend some time writing his own function supporting all the proposed things. :)