When using sort by name, files with numbered names are ordered in alphabetic order rather than numerical. For example 1, 2, 3, 10, 11, 12, 100, 101, 1000 are ordered as 1, 10, 100, 1000, 101, 11, 12, 2, 3. It's annoying for longer file lists.
Tested on Android 8. Is the sort order system dependent or possible to improve?
TC4A 3.0b13: Numbers are sorted in alphabetic order
Moderators: Hacker, petermad, Stefan2, white
TC4A 3.0b13: Numbers are sorted in alphabetic order
Andrzej P. Wozniak
Polish subforum moderator
Polish subforum moderator
Re: TC4A 3.0b13: Numbers are sorted in alphabetic order
This is normal with computers in general. All file managers do this.
Name your files 0001,0002,0010,0020 if you want then sorted.
With dates, use 2019-12-30 and not 30-12-2019.
Look at the download server of mozilla Firefox for Android, you will see the same thing:
https://ftp.mozilla.org/pub/mobile/releases/
Name your files 0001,0002,0010,0020 if you want then sorted.
With dates, use 2019-12-30 and not 30-12-2019.
Look at the download server of mozilla Firefox for Android, you will see the same thing:
https://ftp.mozilla.org/pub/mobile/releases/
Re: TC4A 3.0b13: Numbers are sorted in alphabetic order
Any good file manager can provide more refined sort order than simple command line tools. Even Windows Explorer can. Do you use Total Commander for Windows?rudolfm wrote: 2019-12-28, 02:11 UTC This is normal with computers in general. All file managers do this.
It's a table generated by a web server using some server-side (command line) tools. Real FTP site looks like that: ftp://ftp.icm.edu.pl/pub/mozilla/firefox/releases/ and it also provides results generated by the server-side tools.rudolfm wrote: 2019-12-28, 02:11 UTCLook at the download server of mozilla Firefox for Android, you will see the same thing: https://ftp.mozilla.org/pub/mobile/releases/
If you go to ftp://ftp.icm.edu.pl/pub/ you will see typical Unix-like sort order (UPPERCASE before lowercase) - it's system dependent sort order. Firefox does NOT re-sort names to use letter-case independent sort.
Andrzej P. Wozniak
Polish subforum moderator
Polish subforum moderator
- ghisler(Author)
- Site Admin
- Posts: 50541
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: TC4A 3.0b13: Numbers are sorted in alphabetic order
Sadly there is no sort function in Java to sort with this so called "natural sorting" method. I could do my own sort function, but it would be many orders of magnitude slower because java byte code is much slower than hard coded machine code used now.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Re: TC4A 3.0b13: Numbers are sorted in alphabetic order
2ghisler(Author)
Thanks for explanations. Some apk developers seems to ignore that fact - they use numbers without leading zeros for filenames and provide misordered lists in their apps.
Thanks for explanations. Some apk developers seems to ignore that fact - they use numbers without leading zeros for filenames and provide misordered lists in their apps.
Andrzej P. Wozniak
Polish subforum moderator
Polish subforum moderator