Your message dated Tue, 6 Nov 2007 00:39:17 -0700
with message-id <[EMAIL PROTECTED]>
and subject line Bug#449504: coreutils: ls alpabetical, but not
has caused the attached Bug report to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere. Please contact me immediately.)
Debian bug tracking system administrator
(administrator, Debian Bugs database)
--- Begin Message ---
Package: coreutils
Version: 5.97-5.3
Severity: minor
ls (with no arguments) gives this listing:
urg_laser.cc
urglaserdriver.cc
urglaserdriver.lo
urglaserdriver.o
urg_laser.h
urg_laser.lo
urg_laser.o
although it is alphabetical (counting _ as nonexistent), it is weird to split
the urg_laser.* files from the urglaserdriver.* files. i think it should
account for the _.
-- System Information:
Debian Release: lenny/sid
APT prefers testing
APT policy: (980, 'testing'), (960, 'stable'), (900, 'unstable'), (800,
'experimental')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.22-hrt6 (SMP w/2 CPU cores)
Locale: LANG=en_AU, LC_CTYPE=en_AU (charmap=ISO-8859-1)
Shell: /bin/sh linked to /bin/dash
Versions of packages coreutils depends on:
ii libacl1 2.2.45-1 Access control list shared library
ii libc6 2.6.1-6 GNU C Library: Shared libraries
ii libselinux1 2.0.15-2+b1 SELinux shared libraries
coreutils recommends no packages.
-- no debconf information
--- End Message ---
--- Begin Message ---
Jayen wrote:
> ls (with no arguments) gives this listing:
> urg_laser.cc
> urglaserdriver.cc
> urglaserdriver.lo
> urglaserdriver.o
> urg_laser.h
> urg_laser.lo
> urg_laser.o
That is the locale specific sort order for LANG=en_AU. It is expected
behavior in that locale.
Personally I use the following configuration.
export LANG=en_US.UTF-8
export LC_COLLATE=C
The use of LC_COLLATE=C forces a standard sort ordering. It may cause
issues sorting non-ascii characters because it forces sorting them by
native byte values. YMMV. That is the tradeoff in order to avoid the
en_* locale collating sequence and return to a standard sort ordering.
The sort man page says this:
*** WARNING *** The locale specified by the environment affects sort
order. Set LC_ALL=C to get the traditional sort order that uses native
byte values.
> although it is alphabetical (counting _ as nonexistent), it is weird
> to split the urg_laser.* files from the urglaserdriver.* files. i
> think it should account for the _.
Yes, it is very weird. But that is also the expected behavior. I
believe that the author of the en_* locale confused writing text on a
computer with using a computer to manipulate data. I don't like it,
and you don't like it, but that is the way that it is and we did not
vote for it.
> Locale: LANG=en_AU, LC_CTYPE=en_AU (charmap=ISO-8859-1)
That is the source of this behavior. en_AU would specify a dictionary
sort ordering. Case is folded and punctuation is ignored.
See also the GNU coreutils FAQ for more (dated) information on this:
http://www.gnu.org/software/coreutils/faq/
Bob
--- End Message ---