2

One of the most infuriating things that causes me much frustration when I am using Linux is the completely assinine way that files get sorted when sorting by name. This is compounded by the output of ls -l producing a different sort order than, say, Nautilus.

Is there a simple way to get Windows-like collation in Linux so I can stop beating my head against the wall?

Symbols > Numbers > Letters (modified letters such as o-umlaut just count as o)

This has been an open issue on the GNOME bug tracker for about 12 years or so now and I assume this will never be fixed properly, so perhaps there is a work around I can do?

Karai17
  • 137
  • 2
    Sounds like you want the C locale rather then a language/country specific one. – Chris Davies Sep 07 '18 at 22:40
  • 1
    I've looked into that but from what I've read, both C and POSIX locales aren't quite right. Perhaps I misread? – Karai17 Sep 07 '18 at 23:07
  • Oh ok. Out of interest which is "wrong": Nautilus or ls? – Chris Davies Sep 07 '18 at 23:09
  • 2
    Nautilus is the wrong one. Nautilus ignores prepended symbols so _bbb will show up after aaa instead of before. – Karai17 Sep 07 '18 at 23:47
  • 2
    After doing some more digging, I found that WINE has implemented this sort order for their purposes here: https://github.com/aidfarh/wine/blob/master/dlls/shlwapi/string.c#L2219-L2285 – Karai17 Sep 08 '18 at 02:56
  • 2
    Also here is microsoft's definition of their own function: https://docs.microsoft.com/en-gb/windows/desktop/api/shlwapi/nf-shlwapi-strcmplogicalw – Karai17 Sep 08 '18 at 02:59
  • Related questions are https://unix.stackexchange.com/questions/471442/ , https://unix.stackexchange.com/questions/39827/ , and https://unix.stackexchange.com/questions/35469/ . – JdeBP Sep 26 '18 at 08:26

0 Answers0