Gentoo Archives: gentoo-portage-dev

From: Marius Mauch <genone@g.o>
To: gentoo-portage-dev@l.g.o
Subject: Re: [gentoo-portage-dev] Perl, sort, and locale
Date: Thu, 04 May 2006 00:43:18
Message-Id: 44594195.7080808@gentoo.org
In Reply to: [gentoo-portage-dev] Perl, sort, and locale by felix@crowfix.com
1 felix@×××××××.com schrieb:
2 > I doubt this is the right place to bring this up, but maybe some one
3 > can tell me where to go :-)
4
5 Yeah, this is definitely the wrong place, not really sure where the
6 appropriate place for this is though. Probably a perl or coreutils
7 related list/forum might help you.
8
9 > I have discovered an inconsistency in how perl and sort handle locale.
10 > Here are two commands you can run in a shell ...
11 >
12 > (echo '/'; echo '?') | sort
13 >
14 > (echo '/'; echo '?') | perl -e '@x = <>; print $_ foreach sort @x'
15 >
16 > With LANG=en_US.UTF-8, sort says ? comes before /, perl says the
17 > opposite. Setting LC_COLLATE=C switches the sort behavior. I have no
18 > idea what else changes or where else perl and sort disagree, or what
19 > other programs do.
20 >
21 > Seems like something is wrong, but I don't know what. This happens on
22 > other versions of Linux. It is not a gentoo specific problem.
23
24 --
25 gentoo-portage-dev@g.o mailing list