First question - why does the default profile (i.e. /etc/profile) set the LC_ALL environment variable? Surely it would be better to set the LANG variable. If you set LC_ALL it *overrides* any individual settings to other LC_ variables so you can't set LC_CTYPE (for example) while leaving others unset.
Second question - is there any easy way to get a sensible (i.e. POSIX) collation sequence while at the same time getting accented characters by setting LC_CTYPE to 'en_GB'? At present I need to:- unset LC_ALL export LC_CTYPE=en_GB export LC_COLLATE=POSIX (unless of course I change /etc/profile, but then it's another system customisation that I'll lose and forget about at the next upgrade)
It seems broken to me that the en_GB collate sequence mixes up all the hidden files with normal file, why does it do this? Did it always do this, it's only recently that 'ls -a' has produced what looks to me anyway like a very mixed up output.
Chris Green chris@areti.co.uk wrote:
First question - why does the default profile (i.e. /etc/profile) set the LC_ALL environment variable? Surely it would be better to set the LANG variable.
It doesn't here. It sets LANG=en_GB.UTF-8 (which is then overridden for some users here with eo_XX.UTF-8). Do you know where that setting came from? If it's a bug, report it please.
Your accent problem sounds like a character set problem. What's your terminal using and what's the locale default?
It seems broken to me that the en_GB collate sequence mixes up all the hidden files with normal file, why does it do this? Did it always do this, it's only recently that 'ls -a' has produced what looks to me anyway like a very mixed up output.
There are also some other environment settings and aliases which can affect this on some systems - it really irritates me when distributions do silly things to core tools like ls without asking.
On Wed, Jun 22, 2005 at 01:57:43PM +0100, MJ Ray wrote:
Chris Green chris@areti.co.uk wrote:
First question - why does the default profile (i.e. /etc/profile) set the LC_ALL environment variable? Surely it would be better to set the LANG variable.
It doesn't here. It sets LANG=en_GB.UTF-8 (which is then overridden for some users here with eo_XX.UTF-8). Do you know where that setting came from? If it's a bug, report it please.
Hmm, I think maybe it doesn't actually set it by default, it may be that I added it (oops!).
Your accent problem sounds like a character set problem. What's your terminal using and what's the locale default?
I don't have an accent problem, but I do need to have the LC_CTYPE variable set to european language and not POSIX or C to get accents.
It seems broken to me that the en_GB collate sequence mixes up all the hidden files with normal file, why does it do this? Did it always do this, it's only recently that 'ls -a' has produced what looks to me anyway like a very mixed up output.
There are also some other environment settings and aliases which can affect this on some systems - it really irritates me when distributions do silly things to core tools like ls without asking.
Yes, I hate those coloured directory listings one gets by default nowadays.
A bit of Googling around and other checks indicate that the odd (new) LC_COLLATE order when it's set to anything other than POSIX or C is correct, or at least as designed. Apparently it's to improve POSIX conformance. It still seems to me that ignoring the leading . when sorting is 'broken'.