Bugzilla – Bug 141371
Shell command sort options unusable or strange defaults
Last modified: 2006-01-11 14:22:46 UTC
The shell sort command has at least these 2 options always turned on in case you use German language: -d, --dictionary-order -f, --ignore-case As there is no way to reverse the effect of any default options (except there is a hidden not-documented way I do not know) it is impossible to do normal sorts. Only with the workaround of LC_ALL=C it is possible to do normal sort (and only from shell context and with loosing native language). Either the default options should be same for all the languages (which I would prefer especially when thinking about scripts using sort) or there should be reverse-options to everthing which can get turned on by default.
The default sorting order is provided by your language setup. If you do not like german sorting order and prefer plain POSIX rules you may use LC_COLLATE=POSIX export LC_COLLATE Nevertheless I will not break global localization for all users.
That is not the point. I don't complain about the defaults. The problem is, that a user cannot change the settings, when in non-english mode (whereas an english user can). There are no negative forms for the related options (when they are turned on). As sort is probably a GNU tool, a added "!" in the getopt arguments will add the negative form and thus fix this (additionally requiring manual page updates as well thought). Setting LC_COLLATE or any other environment variable is no acceptable workaround. There are to many side effects and restrictions to this.
This is how LC_COLLATE is supposed to work.
To RESTRICT a user to locales defaults? I cannot believe this. Sorry. Maybe I live in a different world, but I see a big difference between default settings and the IMPOSSIBILITY to change settings. Thought, as it seems instead of fixing the bug it will be handled as invalid again, I will no reopen it. Seems SuSE goes the Microsoft way: "It's not a bug, it's a feature".