On Tue, May 28, 2002 at 10:43:51PM -0600, Bob Proulx wrote: > > Just a quick question on a related matter. I have been using this > > machine for a while now. $LANG was always set to C. > > C is the same as POSIX and the same as unset which is to say you get > traditional sort order. Things are sorted like US-ASCII which is > [A-Z] before [a-z] and the like. Setting to en_US and other overrides > the default behavior and changes the sort ordering, among other > things. >
Thanks for taking the time for your detailed answer. I understand more than I did before, and the clouds are clearing up. > > I installed the locales package and reconfigured to en_US. What > > exactly does this do for me? > > Everything that sorts such as the sort command, ls, /bin/bash when > doing glob expansion, etc. literally everything will now sort in > dictionary order. Like [AaBbCcDd] and so on. > > Check out the differences between these two commands on different > directories. > > LC_ALL=POSIX ls -a > > LC_ALL=en_US ls -a > > Assuming that you have en_US installed then you will find that things > are now sorting in dictionary order instead of us-ascii order. That > is, Makefile is next to makefile, Aligator is next to aardvark, for > example. Yep, gaya comes before GAYA. Makes sense. > > > Could somebody please explain how locales work? Is it specific to Linux? > > Specific to Debian? > > Locales are tables which configure the strcoll() library routine which > applications call when sorting. Do a 'man strcoll' to start that > documentation trail. If you have different tables then you can > support say chinese sort order which can make native language support > possible. Prior to locales everything was in us-ascii and if you did > not speak english you were out of luck. > It seems sorting is fundamental to language support. > I can't help too much but if you want to see how commands react to it > you can check out the online standards documentation for a command > such as sort. > > http://www.unix-systems.org/single_unix_specification_v2/xcu/sort.html > This has already explained quite a bit, thanks. I guess all of this is related to the Debian package, localepurge. I deployed it and got rid of quite a few locale files (about 80MB in freed space). Hopefully, I didn't break anything. -Andy -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]