May 2008 Archives

Lazy lazy leopard. All the collate definitions seem to point to ascii based sorting in english locales.
himitsu:/usr/share/locale% ls -l en_*/LC_COLLATE
lrwxr-xr-x  1 root  wheel  29 21 Feb 16:19 en_AU.ISO8859-1/LC_COLLATE@ -> ../la_LN.ISO8859-1/LC_COLLATE
lrwxr-xr-x  1 root  wheel  30 21 Feb 16:19 en_AU.ISO8859-15/LC_COLLATE@ -> ../la_LN.ISO8859-15/LC_COLLATE
lrwxr-xr-x  1 root  wheel  28 21 Feb 16:19 en_AU.US-ASCII/LC_COLLATE@ -> ../la_LN.US-ASCII/LC_COLLATE
lrwxr-xr-x  1 root  wheel  28 21 Feb 16:19 en_AU.UTF-8/LC_COLLATE@ -> ../la_LN.US-ASCII/LC_COLLATE
lrwxr-xr-x  1 root  wheel  28 21 Feb 16:19 en_AU/LC_COLLATE@ -> ../la_LN.US-ASCII/LC_COLLATE
lrwxr-xr-x  1 root  wheel  29 21 Feb 16:19 en_CA.ISO8859-1/LC_COLLATE@ -> ../la_LN.ISO8859-1/LC_COLLATE
lrwxr-xr-x  1 root  wheel  30 21 Feb 16:19 en_CA.ISO8859-15/LC_COLLATE@ -> ../la_LN.ISO8859-15/LC_COLLATE
lrwxr-xr-x  1 root  wheel  28 21 Feb 16:19 en_CA.US-ASCII/LC_COLLATE@ -> ../la_LN.US-ASCII/LC_COLLATE
lrwxr-xr-x  1 root  wheel  28 21 Feb 16:19 en_CA.UTF-8/LC_COLLATE@ -> ../la_LN.US-ASCII/LC_COLLATE
lrwxr-xr-x  1 root  wheel  28 21 Feb 16:19 en_CA/LC_COLLATE@ -> ../la_LN.US-ASCII/LC_COLLATE
lrwxr-xr-x  1 root  wheel  29 21 Feb 16:19 en_GB.ISO8859-1/LC_COLLATE@ -> ../la_LN.ISO8859-1/LC_COLLATE
lrwxr-xr-x  1 root  wheel  30 21 Feb 16:19 en_GB.ISO8859-15/LC_COLLATE@ -> ../la_LN.ISO8859-15/LC_COLLATE
lrwxr-xr-x  1 root  wheel  28 21 Feb 16:19 en_GB.US-ASCII/LC_COLLATE@ -> ../la_LN.US-ASCII/LC_COLLATE
lrwxr-xr-x  1 root  wheel  28 21 Feb 16:19 en_GB.UTF-8/LC_COLLATE@ -> ../la_LN.US-ASCII/LC_COLLATE
lrwxr-xr-x  1 root  wheel  28 21 Feb 16:19 en_GB/LC_COLLATE@ -> ../la_LN.US-ASCII/LC_COLLATE
lrwxr-xr-x  1 root  wheel  28 21 Feb 16:19 en_IE.UTF-8/LC_COLLATE@ -> ../la_LN.US-ASCII/LC_COLLATE
lrwxr-xr-x  1 root  wheel  28 21 Feb 16:19 en_IE/LC_COLLATE@ -> ../la_LN.US-ASCII/LC_COLLATE
lrwxr-xr-x  1 root  wheel  29 21 Feb 16:19 en_NZ.ISO8859-1/LC_COLLATE@ -> ../la_LN.ISO8859-1/LC_COLLATE
lrwxr-xr-x  1 root  wheel  30 21 Feb 16:19 en_NZ.ISO8859-15/LC_COLLATE@ -> ../la_LN.ISO8859-15/LC_COLLATE
lrwxr-xr-x  1 root  wheel  28 21 Feb 16:19 en_NZ.US-ASCII/LC_COLLATE@ -> ../la_LN.US-ASCII/LC_COLLATE
lrwxr-xr-x  1 root  wheel  28 21 Feb 16:19 en_NZ.UTF-8/LC_COLLATE@ -> ../la_LN.US-ASCII/LC_COLLATE
lrwxr-xr-x  1 root  wheel  28 21 Feb 16:19 en_NZ/LC_COLLATE@ -> ../la_LN.US-ASCII/LC_COLLATE
lrwxr-xr-x  1 root  wheel  29 21 Feb 16:19 en_US.ISO8859-1/LC_COLLATE@ -> ../la_LN.ISO8859-1/LC_COLLATE
lrwxr-xr-x  1 root  wheel  30 21 Feb 16:19 en_US.ISO8859-15/LC_COLLATE@ -> ../la_LN.ISO8859-15/LC_COLLATE
lrwxr-xr-x  1 root  wheel  28 21 Feb 16:19 en_US.US-ASCII/LC_COLLATE@ -> ../la_LN.US-ASCII/LC_COLLATE
lrwxr-xr-x  1 root  wheel  28 21 Feb 16:19 en_US.UTF-8/LC_COLLATE@ -> ../la_LN.US-ASCII/LC_COLLATE
lrwxr-xr-x  1 root  wheel  28 21 Feb 16:19 en_US/LC_COLLATE@ -> ../la_LN.US-ASCII/LC_COLLATE
The 'sorting rule' for irish is:
--
-- Irish Gaelic alphabet:
--
-- Aa (Áá), Bb, Cc, Dd, Ee (Éé), Ff, 
-- Gg, Hh, Ii (Íí), Jj, [Kk], Ll, Mm, 
-- Nn, Oo (Óó), Pp, Qq, Rr, Ss, Tt, 
-- Uu (Úú), Vv, Ww, Xx, Yy, Zz 
--
i.e. Case insensitive, and accented characters after non-accented characters (case insensitive). Surname sorting is even more fun, but I would not expect ls to do that. Finder sorts correctly in this case, but that seems to be due to the fact that it uses the Unicode Collation Algorithm. Shame, I would have preferred both to use the same mechanism.
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).

Rail strikes

| No Comments | No TrackBacks
Well, they certainly announce these things, don't they. No trains to the Kingdom this weekend unless I was planning on getting an earlier, jammers one and then no guarantee that I was be able to get back to Dublin on Monday.
I'm just not in the mood to rearrange things at this stage.
Oh, seems to be broken :(


open -h(uuuh?)

| No Comments | No TrackBacks
On windows we have start for launching documents and applications. On gnome we have gnome-open which opens documents and applications. On the mac we have the 'open' command. Open -a launches the specified application (based on the app paths). Open on it's own launches a document with the registered preferred application. Then there's 'open -h'.
% open -h unistd.h
unistd.h?
[0]	cancel
[1]	all

[2]	/System/Library/Frameworks/Kernel.framework/Headers/libsa/unistd.h
[3]	/System/Library/Frameworks/Kernel.framework/Headers/sys/unistd.h
[4]	/usr/include/sys/unistd.h
[5]	/usr/include/unistd.h

Which header(s) for "unistd.h"? 5
It opens up header files. I mean WTF?
Having broken my iPod, I decided to change the root password from the default of 'alpine' to something more sensible. I logged in and changed the root password using the passwd command. More fool me, apparently as the springboard kept restarting on me.
I still had ssh access (and root login worked). I made sure that the user/group listings were set to 0 for the mobile user in both the passwd and master.passwd files. Then I made sure that all the entries in passwd had an asterisk for the password and the entry in the master.passwd file contained the output from perl -e 'print crypt("yournewpassword", "/s"), "\n"'. All is good again! I think...
Update: later, things were still not working properly so I restored and just manually put in the entry for the account rather than trying to convince it to work. Oh well, practice makes imperfect I suppose.
Well as I got a replacement box, I suppose I should actually document how I got it working.
pop up a terminal window.
$ sudo -s
# cpan
.... answer the prompts ....
from the cpan> prompt issue an install Crypt::SSLeay (it will probably break).
If it breaks, then do an:
cpan> look Crypt::SSLeay
... output elided ...
# perl Makefile.PL
... answer questions ...
# make
# make install
# lwp-request -x https://mail.google.com/mail/
... output elided, but it does contain the content of the secure google home page ...
Now this is quite telling. I have calendar appointments stored on plaxo with start dates outside of the 32bit unix representation of a date (i.e. before 1970. Gosh, what a surprise that I would have a recurring appointment that started before 1970, now who's birthday could that be?).
It's probably a limitation of the javascript underlying what they're using. It seems to screw up birthday entries as well (off by one, for some reason?)

About this Archive

This page is an archive of entries from May 2008 listed from newest to oldest.

April 2008 is the previous archive.

June 2008 is the next archive.

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