Wrong sorting of files and directories with "-" (minus) in name
Moderators: Hacker, petermad, Stefan2, white
Wrong sorting of files and directories with "-" (minus) in name
Wrong sorting of files and directories with "-" (minus) in name
example - files sorted in TC9.50b12 by filename or extension
aaaa.txt
-aaaa.txt
aabb.txt
bbbb.txt
-bbbb.txt
cccc.txt
-cccc.txt
dddd.txt
eeee.txt
"-????.txt" files should be grouped.
example - files sorted in TC9.50b12 by filename or extension
aaaa.txt
-aaaa.txt
aabb.txt
bbbb.txt
-bbbb.txt
cccc.txt
-cccc.txt
dddd.txt
eeee.txt
"-????.txt" files should be grouped.
Re: Wrong sorting of files and directories with "-" (minus) in name
Are you aware of the different sort methods TC provides? You can change the sort method in Configuration > Options > Display > Sort method.
Regards
Dalai
Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64
Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64
Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
Re: Wrong sorting of files and directories with "-" (minus) in name
Oh, my fault. I did not notice this choice in the menu.
Sorry for the fake bug report.
Sorry for the fake bug report.
Re: Wrong sorting of files and directories with "-" (minus) in name
There is still a problem with the correct sorting of letters with accents in my language (Czech) at the same time as the "-" letter, but switching the sorting options can solve it.
I tried all settings.
"Alphabetical, considering accents" - correct sorting of characters with accents, but problem with "-".
"Natural sorting: alphabetical and numbers" anad both "charcode sorting" - correct grouping names with "-", but wrong sorting of characters with accents.
If merged option "Alphabetical, considering accents + Natural sorting: alphabetical and numbers" were to exist, it would solve this problem altogether.
I tried all settings.
"Alphabetical, considering accents" - correct sorting of characters with accents, but problem with "-".
"Natural sorting: alphabetical and numbers" anad both "charcode sorting" - correct grouping names with "-", but wrong sorting of characters with accents.
If merged option "Alphabetical, considering accents + Natural sorting: alphabetical and numbers" were to exist, it would solve this problem altogether.
Re: Wrong sorting of files and directories with "-" (minus) in name
2susla
It seems to be a special problem when prefixing with "-" - if you use other characters like "_", "+" or " " (space) - the sorting is grouped according to the prefix character...
See: https://madsenworld.dk/tcmd/accentsorting.png
Notice that certain accented characters are sorted differently under different locales - that is why ä is sorted after æ and ö is sorted after ø in the screenshot, because ä and ö are considered subtypes of æ and ø in Danish.
It seems to be a special problem when prefixing with "-" - if you use other characters like "_", "+" or " " (space) - the sorting is grouped according to the prefix character...
See: https://madsenworld.dk/tcmd/accentsorting.png
Notice that certain accented characters are sorted differently under different locales - that is why ä is sorted after æ and ö is sorted after ø in the screenshot, because ä and ö are considered subtypes of æ and ø in Danish.
License #524 (1994)
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Re: Wrong sorting of files and directories with "-" (minus) in name
Yes, it is exactly as you wrote, special problem when prefixing with "-" in languages with accents.
Re: Wrong sorting of files and directories with "-" (minus) in name
The "Natural sorting: alphabetical and numbers" is the same sorting as in Windows Explorer and if I recall corretcly: TC uses Windows functions for this sort method, so there is probably not much to do about it.
License #524 (1994)
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
- ghisler(Author)
- Site Admin
- Posts: 50400
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: Wrong sorting of files and directories with "-" (minus) in name
It seems to be a misfeature of the "Natural sorting" function StrCmpLogicalW, which sorts numbers by their value instead of sorting them althabetically, e.g. 99 comes before 100. I guess that it sees the "-" as a negative sign, and therefore ignores it.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com