pkgsrc-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
pkg_alternatives, Darwin and locale
Hi,
It seems that pkg_alternatives breaks on Darwin if the locale is
anything but "C". This is because the negation symbol (¬) is used as a
delimiter and for some reason (bug or other) tr on Darwin can't deal
with that in a en_US locale. sed has problems too.
For example, on Mac OS X...
$ locale
LANG="en_US"
LC_COLLATE="en_US"
LC_CTYPE="en_US"
LC_MESSAGES="en_US"
LC_MONETARY="en_US"
LC_NUMERIC="en_US"
LC_TIME="en_US"
LC_ALL=
$ ruby --version
tr: Illegal byte sequence
ruby (wrapper): no alternatives found
$ export LC_ALL="C"
$ ruby --version
ruby 1.8.7 (2008-06-20 patchlevel 22) [i386-darwin9]
It seems like a problem on Darwin, because I've tested the same on AIX,
Linux and NetBSD.
While trying to reproduce this on NetBSD, I noticed that setting LC_ALL
doesn't appear to update all of the LC_ environment variables as it does
on other systems. Not sure if this is intentional or what.
Anyway might it be better for pkg_alternatives to use an ASCII character
for this in case older systems' tr or sed etc. don't understand >7-bit
characters?
Who knows when Apple will fix this? Maybe we can't wait!
Louis
Home |
Main Index |
Thread Index |
Old Index