You are not logged in.

#1 2007-05-26 02:41:20

NobodySpecial
Member
Registered: 2007-04-12
Posts: 28

Please help with alphabetization

I have Arch on two systems, and both have the same issue.  Alphabetization (whether in a terminal, nautilus, or about anywhere else) is as follows:
A B C a b c

How do I make it:
A a B b C c ?

I searched Arch forums and couldn't find anything.  I also searched via Google, and found one reference to this problem and read that it was a locale issue.

Here's what I have:

/etc/locale.gen
en_US.UTF-8    UTF-8
en_US    ISO-8859-1

/etc/rc.conf
LOCALE="en_US"
(but I've also tried en_US.UTF-8 and makes no difference).

Thanks for any help on this issue.

Offline

#2 2007-05-26 07:02:34

tardo
Member
Registered: 2006-07-15
Posts: 526

Re: Please help with alphabetization

LOCALE="en_US.utf8"

I still have no idea what you're trying to do...

Offline

#3 2007-05-26 15:44:41

NobodySpecial
Member
Registered: 2007-04-12
Posts: 28

Re: Please help with alphabetization

tardo - Thanks for the reply.  I tried that, but alphabetization still doesn't work right.

In any directory listing, the words starting with Capital letters are alphabetized first, then the words with lower case.  Example:

Banana
Orange
Strawberry
apple
coconut
pear

I can't figure out why things are working this way under Arch.  I don't have this problem in other distros, so there must be some mis-configuration on my part.

Thanks for any help in solving this problem.

Offline

#4 2007-05-26 16:07:12

test1000
Member
Registered: 2005-04-03
Posts: 834

Re: Please help with alphabetization

you can use the C locale if you want abcde...

just put LANG=C in your script i think


KISS = "It can scarcely be denied that the supreme goal of all theory is to make the irreducible basic elements as simple and as few as possible without having to surrender the adequate representation of a single datum of experience." - Albert Einstein

Offline

#5 2007-05-26 16:27:08

prim
Member
From: Wroclaw - Poland
Registered: 2006-05-10
Posts: 47

Re: Please help with alphabetization

This should be determined by LC_COLLATE (at least according to bash manual). Try changing this variable to en_US.


Feel free to correct my English

Offline

#6 2007-05-27 04:18:37

NobodySpecial
Member
Registered: 2007-04-12
Posts: 28

Re: Please help with alphabetization

Yes!  It works!

Simply add this to .bashrc:

export LC_COLLATE="en_US.utf8"

Big thanks to test1000 and prim - one huge frustration solved.

And huge thanks as well to Judd and the entire Arch community for making this such a great distro.  smile

Offline

#7 2007-05-27 11:28:02

NobodySpecial
Member
Registered: 2007-04-12
Posts: 28

Re: Please help with alphabetization

Also have to make the above change in /etc/profile.

Offline

#8 2007-07-04 22:09:56

thayer
Fellow
From: Vancouver, BC
Registered: 2007-05-20
Posts: 1,560
Website

Re: Please help with alphabetization

There's no need to add the export settings to your .bashrc.  Simply commenting the line in /etc/profile will revert your LC_COLLATE variable back to whatever you have set as your LOCALE in /etc/rc.conf.  For example:

#export LC_COLLATE="C"

What I want to know is why /etc/profile has this line by default in the first place.

Last edited by thayer.w (2007-07-04 22:10:38)


thayer williams ~ cinderwick.ca

Offline

Board footer

Powered by FluxBB