Sorting question (Config/Sort method)

Here you can propose new features, make suggestions etc.

Moderators: sheep, Hacker, Stefan2, white

Post Reply
User avatar
wanderer
Power Member
Power Member
Posts: 1312
Joined: 2003-03-28, 14:35 UTC
Location: Sol

Sorting question (Config/Sort method)

Post by *wanderer » 2006-11-01, 15:31 UTC

"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?
- Wanderer -

¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Latest TC / x32: WinXPx32 SP3 / x64: Clients/Servers from Win7SP1 through Win19Server

User avatar
Clo
Moderator
Moderator
Posts: 5731
Joined: 2003-12-02, 19:01 UTC
Location: Bordeaux, France
Contact:

No more, no sum…

Post by *Clo » 2006-11-02, 06:46 UTC

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
#31505 Traducteur Français de TC French translator Aide en Français Tutoriels Français English Tutorials

User avatar
m^2
Power Member
Power Member
Posts: 1413
Joined: 2006-07-12, 10:02 UTC
Location: Poland
Contact:

Post by *m^2 » 2006-11-02, 06:58 UTC

I think there should be an option of defining custom sorting. This would also solve a problem with national characters placing.

User avatar
wanderer
Power Member
Power Member
Posts: 1312
Joined: 2003-03-28, 14:35 UTC
Location: Sol

Post by *wanderer » 2006-11-02, 09:02 UTC

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.
- Wanderer -

¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Latest TC / x32: WinXPx32 SP3 / x64: Clients/Servers from Win7SP1 through Win19Server

User avatar
m^2
Power Member
Power Member
Posts: 1413
Joined: 2006-07-12, 10:02 UTC
Location: Poland
Contact:

Post by *m^2 » 2006-11-02, 09:30 UTC

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.

User avatar
wanderer
Power Member
Power Member
Posts: 1312
Joined: 2003-03-28, 14:35 UTC
Location: Sol

Post by *wanderer » 2006-11-02, 09:49 UTC

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. :)
- Wanderer -

¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Latest TC / x32: WinXPx32 SP3 / x64: Clients/Servers from Win7SP1 through Win19Server

Post Reply