FS#10435 - LC_COLLATE="C" should be removed from /etc/profile
Attached to Project:
Arch Linux
Opened by Heiko Baums (cyberpatrol) - Saturday, 17 May 2008, 10:28 GMT
Last edited by Aaron Griffin (phrakture) - Thursday, 20 November 2008, 20:34 GMT
Opened by Heiko Baums (cyberpatrol) - Saturday, 17 May 2008, 10:28 GMT
Last edited by Aaron Griffin (phrakture) - Thursday, 20 November 2008, 20:34 GMT
|
Details
Description:
I had a problem with the sorting of the ls output and the menu items in KMenu. They were sorted ASCII like and case sensitive, instead of alphabetically and case insensitive as it is expected and defined in my chosen locale. This is, because in /etc/profile the variable LC_COLLATE is set to "C" independently of the variable LOCALE in /etc/rc.conf. So the line `LC_COLLATE="C"` should be removed from /etc/profile. If someone needs a different LC_COLLATE than this one set by the chosen locale, this can and should be set manually in /etc/profile or /etc/profile.d/locale.sh, depending on the result of It should, at least, be explained in http://wiki.archlinux.org/index.php/Configuring_locales, that LC_COLLATE="C" is set in /etc/profile, that this can be removed or changed, and which effect this has. LC_COLLATE is, btw., not necessary to get and keep the system running. If a script needs LC_COLLATE="C" for whatever reason, the command, which needs it, should be prefixed with 'LC_COLLATE="C"' in the script, so that this setting is changed only for this command. Additional info: * package version(s) filesystem 2008.03-2 * config and/or log files etc. /etc/profile |
This task depends upon
Closed by Aaron Griffin (phrakture)
Thursday, 20 November 2008, 20:34 GMT
Reason for closing: Won't fix
Additional comments about closing: Can't please all of the people all of the time. Trying to cover the common case, added docs for the edge case
Thursday, 20 November 2008, 20:34 GMT
Reason for closing: Won't fix
Additional comments about closing: Can't please all of the people all of the time. Trying to cover the common case, added docs for the edge case
http://bugs.gentoo.org/show_bug.cgi?id=208082
As mentioned within the bug, there are various applications that are unduly sensitive to locale settings and, in some cases, exhibit broken behaviour when dealing with a UTF-8 based collation order. Some examples are provided in the opening comment and in comment #20 and there are probably more that have yet to be identified.
For these reasons, Gentoo actually went in the other direction and now suggests defining LC_COLLATE="C" although, unfortunately, the documentation doesn't go into the rationale behind this change (unlike the bug!). A formative example of how the issue might be adequately presented to the user is demonstrated in the opening comment of the bug:
"Note: Locale settings can sometimes cause unexpected behavior in utilities that use glibc's regular expressions library, like sed and grep. Setting LC_COLLATE=C can prevent such unexpected behavior without impacting the rest of your localization ..."
If some single programs don't work correctly with LC_COLLATES other than "C", then it's a bug in these programs and a bug report should be reported to the upstream developers of these programs or to the glibc developers, if this is really a glibc issue. Or these programs should set LC_COLLATE="C" by themselves in their own environment, but not system wide. And, btw., I hadn't had a problem with LC_COLLATE="de_DE.UTF-8", yet, which I'm using.
Ultimately, whether it stays or goes, I think it is important that users are made fully aware of the aformentioned pitfalls so that they are able to make an informed decision as to whether it is a matter they think they need to address or not; this is the exact sentiment that I was trying to express in the Gentoo bug. I notice that you have since commented on it and concur that it was not addressed in an ideal fashion in that particular case.
Also note that if you think something should be in a wiki page, then edit it yourself. That's why it's a publicly editable wiki!
I will edit it for you...