[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: ls defaults...



On Wed, Feb 08, 2006 at 11:10:10PM -0500, Shawn Lamson wrote:
> except that most local users will have a different alias for ls set
> in .bashrc.... i had the same phenomona here... my locales were set
> to en_US .. I had problem upgrading locales lately... but 
> #export LC_TIME=POSIX , or LC_ALL=POSIX, fixed the problem
> you are having (in my current xterm)... i'd say check your
> locales, mine seemed to have changed too.

Exactly, and of course not everyone uses bash, and an alias would not
help an application that exec()'d '/bin/ls' directly, expecting to be
able to parse the output.

A change to the locale setting might be an acceptible workaround, but
after installation the locale looks like:

	$ locale
	LANG=en_GB
	LC_CTYPE="en_GB"
	LC_NUMERIC="en_GB"
	LC_TIME="en_GB"
	LC_COLLATE="en_GB"
	LC_MONETARY="en_GB"
	LC_MESSAGES="en_GB"
	LC_PAPER="en_GB"
	LC_NAME="en_GB"
	LC_ADDRESS="en_GB"
	LC_TELEPHONE="en_GB"
	LC_MEASUREMENT="en_GB"
	LC_IDENTIFICATION="en_GB"
	LC_ALL=

Whereas on the SuSE system it looks like:
locale
	LANG=en_GB
	LC_CTYPE="en_GB"
	LC_NUMERIC="en_GB"
	LC_TIME="en_GB"
	LC_COLLATE=POSIX
	LC_MONETARY="en_GB"
	LC_MESSAGES="en_GB"
	LC_PAPER="en_GB"
	LC_NAME="en_GB"
	LC_ADDRESS="en_GB"
	LC_TELEPHONE="en_GB"
	LC_MEASUREMENT="en_GB"
	LC_IDENTIFICATION="en_GB"
	LC_ALL=

So clearly a LC_TIME=POSIX is not needed on other systems, and any user
with an explicit 'LC_TIME=' in their profile may still see an unexpected
change after the switchover...

I don't know if this is an abiguity in the POSIX spec, but it certainly
seems that Debian is diverging from other systems here, which I would
certainly hope would not be done without a very good reason...

Interestingly, 'env - ls -l' shows that the default behaviour of /bin/ls
is normal, and a bit of trial and errors showed that it is
	LANG=en_GB
in the environment that triggers the new behaviour on Debian (but not
on other systems). So it would appear that something strange in the
localization settings is to blame...

Regards,
DigbyT
-- 
Digby R. S. Tarvin                                          digbyt(at)digbyt.com
http://www.digbyt.com



Reply to: