on RH 6.2, ls sorts asciibetically, but on 7.1 it sorts case insensitive alphabetically. How do I revert to asciibetical order?
Philip
On Mon, 13 Aug 2001, Keyur Shroff wrote:
on RH 6.2, ls sorts asciibetically, but on 7.1 it sorts case insensitive alphabetically. How do I revert to asciibetical order?
Just set export LANG=C
Cool. Why does it happen like this? In RH6.2 I have LANG=en_US. On 7.1 it doesn't work right, but LANG=en works. Explain.
Philip
On Mon, 13 Aug 2001, Philip S Tellis wrote:
Just set export LANG=C
Cool. Why does it happen like this? In RH6.2 I have LANG=en_US. On 7.1 it doesn't work right, but LANG=en works. Explain.
In glibc 2.1.x, sorting order for en_US was defined in such a way that the alphabets are sorted in order of first appearance in ISO-10646. In ISO-10646, uppercase letters appear before lowercase letters. RedHat Linux 6.2 and earlier versions used glibc 2.1.x, that's why character are sorted like that.
In glibc 2.2.x, the collating sequence for en_US is based on ISO/IEC 14651 standard in which, I think, it sorts case insensitive alphabetically.
- keyur
Cool. Why does it happen like this? In RH6.2 I have LANG=en_US. On 7.1 it doesn't work right, but LANG=en works. Explain.
^^^^^^^ LANG=en will work because there is no locale with name "en". It should be en_US. If you give wrong locale name then it will default to C locale. You can see charmap for current locale using "locale charmap". Try to find out charmaps for different locales like,
en_US en_US.UTF-8 C ja_JP etc. ( This is not a locale name :-) )
- keyur