Natural Numeric Sort Order

Things you’d like to miss in the future...
Forum rules
:warnred20: :warnred20: :warnred20: :warnred20: :warnred20: READ THIS AND DO IT!!! :warnred20: :warnred20: :warnred20: :warnred20: :warnred20:

:info: Please include the following information:
1) Your XYplorer Version (e.g., v28.00.0801)
2) Your Windows Version (e.g., Win 11)
3) Your Screen Scaling Percentage (e.g., 125%).

:info: We strongly recommend adding your Windows Version and Screen Scaling Percentage to the Location field in your Profile or to your Signature. That way, you only have to type them once, and we won't have to search for that vital information.

:info: When attaching an Image, please use the Attachment tab at the bottom of your post and click "Add files".

:warnred20: :warnred20: :warnred20: :warnred20: :warnred20: READ THIS AND DO IT!!! :warnred20: :warnred20: :warnred20: :warnred20: :warnred20:
Post Reply
jacky
XYwiki Master
Posts: 3106
Joined: 23 Aug 2005 22:25
Location: France
Contact:

Natural Numeric Sort Order

Post by jacky »

Just noticed a little bug when using the Natural Numeric Sort Order, now it seems that files starting with numbers are always on top of the list, even before files starting with "special characters" like ! - or #

Strangely, the NNSO seems to be used also on the treeview, but in it folders starting with the "special characters" are BEFORE the ones starting with numbers (like they should be), unlike in the listview....

admin
Site Admin
Posts: 66431
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Natural Numeric Sort Order

Post by admin »

jacky wrote:Strangely, the NNSO seems to be used also on the treeview, but in it folders starting with the "special characters" are BEFORE the ones starting with numbers (like they should be), unlike in the listview....
Well, interesting. You have detected a little trick I use to sort folders apart from files in the list (a trick obviously not needed in the tree): I prefix all foldernames with "a" and all filenames with "b" in my internal buffer, then sort, and then cut the first letter before display or usage of the name.

Unfortunately, as you pointed out, the NNSO function I use (it comes with XP) does a strange thing here, one might even call it a bug: it sorts "!" < "2", but "a!" > "a2" :shock: :? ... that explains what you see.

Unfortunately again, I cannot do anything here (ok, I will not :wink: ). We all gotta stand it.

jacky
XYwiki Master
Posts: 3106
Joined: 23 Aug 2005 22:25
Location: France
Contact:

Post by jacky »

Allright... yeah that's probably a bug in there :? Besides if you used 0 and a instead of a and b folders would be in the right order, but not files... and I need this for files (cause I've a lot of !filename.ext that I want on top of my list) so I'll probably turn the NNSO off and enable it only when I need it

Post Reply