[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: join bug?
From: |
Paul Eggert |
Subject: |
Re: join bug? |
Date: |
Mon, 06 Feb 2006 11:39:09 -0800 |
User-agent: |
Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux) |
german rigau <address@hidden> writes:
> If you see carefully the last example I sent, we obtain two different
> sortings with locale en_US.UTF-8 ... with "sort kk2" we obtain "icecream"
> before "ice_cream" and with "sort -k 1,2 kk2" we obtain "ice_cream" before
> "icecream"!
That is because in that locale, "_" is discarded in the first pass of
the collation comparison. Plain "sort" therefore puts
"icecream%1:13:00:: 07510835 1 0" before "ice_cream%1:13:00:: 07510835
1 1" (because of the "0" versus the "1"). However, "sort -k 1,2" sees
only the "icecream%1:13:00:: 07510835" and "ice_cream%1:13:00::
07510835" and reports the opposite order, because the second pass of
the collation comparison kicks in.
> I use the same collating for sorting and joining.
I didn't see where you did that. You're not doing it in
<http://lists.gnu.org/archive/html/bug-coreutils/2006-02/msg00011.html>,
for example, because the join is only on the first field, but the
sort is sorting via the entire line.
So I still don't see any bug.
Re: join bug?, Bob Proulx, 2006/02/03