bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug #27373] sort -h performs incorrectly if in utf8 locale.


From: C de-Avillez
Subject: Re: [bug #27373] sort -h performs incorrectly if in utf8 locale.
Date: Thu, 03 Sep 2009 09:08:55 -0500

On Wed, 2009-09-02 at 21:43 +0000, Pádraig Brady wrote:
> Follow-up Comment #1, bug #27373 (project coreutils):
> 
> I can't reproduce this or see anything wrong with the code.
> 
> All 720 of my locales work fine:
> 
> $ for LANG in $(locale -a); do printf "KnEnMnZn" | ./sort -h | tr -d 'n';
> echo; done | uniq -c
>     720 KMEZ
> 
> Can you give your libc version?
> Could you add a printf() to the find_unit_order() function in sort.c to see
> if it's called?
> 

Interestingly, it works here with the string you used, and fails in the
following case:

~ $ for LANG in $(locale -a); do printf "A b\nAA b\nAAA b\n"   | sort
-h|tr -d '\n'; echo; done | uniq -c
      1 A bAA bAAA b
     21 AAA bAA bA b
      1 A bAA bAAA b
      2 AAA bAA bA b
~ $ 


~ $ apt-cache policy libc6
libc6:
  Installed: 2.10.1-0ubuntu8
  Candidate: 2.10.1-0ubuntu8
  Version table:
 *** 2.10.1-0ubuntu8 0
        500 http://archive.ubuntu.com karmic/main Packages
        100 /var/lib/dpkg/status
~ $ sort --version
sort (GNU coreutils) 7.5.42-1b2d2
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
<http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by Mike Haertel and Paul Eggert.
~ $ 

I will add the printf you asked, and run it again.

A similar issue has also been reported on Ubuntu
(https://bugs.launchpad.net/bugs/422252), but for coreutils 6.10.

Cheers,

..Carl..

Attachment: signature.asc
Description: This is a digitally signed message part


reply via email to

[Prev in Thread] Current Thread [Next in Thread]