Bad mac on the sorting front

| 1 Comment | No TrackBacks
Well linux and solaris get it correct, but it looks like the little old mac can't sort things lexicographically (even when it claims in the manpage that it does).
On Linux/Solaris:
~/x% locale
LANG=en_IE.UTF-8
LC_CTYPE="en_IE.UTF-8"
LC_NUMERIC="en_IE.UTF-8"
LC_TIME="en_IE.UTF-8"
LC_COLLATE="en_IE.UTF-8"
LC_MONETARY="en_IE.UTF-8"
LC_MESSAGES="en_IE.UTF-8"
LC_PAPER="en_IE.UTF-8"
LC_NAME="en_IE.UTF-8"
LC_ADDRESS="en_IE.UTF-8"
LC_TELEPHONE="en_IE.UTF-8"
LC_MEASUREMENT="en_IE.UTF-8"
LC_IDENTIFICATION="en_IE.UTF-8"
LC_ALL=
~/x% ls
a  B  c
On the Mac:
himitsu:~/x% locale
LANG="en_IE.UTF-8"
LC_COLLATE="C"
LC_CTYPE="en_IE.UTF-8"
LC_MESSAGES="en_IE.UTF-8"
LC_MONETARY="en_IE.UTF-8"
LC_NUMERIC="en_IE.UTF-8"
LC_TIME="en_IE.UTF-8"
LC_ALL=
himitsu:~/x% ls
B  a  c
According to the spec:
The following environment variables shall affect the execution of ls ...
LC_COLLATE
Determine the locale for character collation information in determining the pathname collation sequence.
Sad little mac does not sort by the locale's character collation specification (case insensitive, in case you missed it).

No TrackBacks

TrackBack URL: http://www.petesh.com/scgi-bin/MT/mt-tb.cgi/170

1 Comment

Whatcha expect when you bought a Fisher Price PC? ;-)

Leave a comment

About this Entry

This page contains a single entry by Pete Shanahan published on May 27, 2008 6:38 PM.

Rail strikes was the previous entry in this blog.

Collation information for en_ locales... is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.