Bug 6569 - sort util broken
Summary: sort util broken
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: textutils
Version: 6.1
Hardware: i386
OS: Linux
medium
high
Target Milestone: ---
Assignee: Preston Brown
QA Contact:
URL:
Whiteboard:
: 6762 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 1999-10-31 15:18 UTC by hajic
Modified: 2008-05-01 15:37 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2000-01-14 03:46:38 UTC
Embargoed:


Attachments (Terms of Use)

Description hajic 1999-10-31 15:18:28 UTC
sort does not sort correctly.

sort this using the 5.2 sort and the "new" 6.1 sort:

AFD7#@
AFD71@
AFD71@-6
AFD71A
AFD71A-6
AFD7#@-6
AFP1#@
AFP11@
AFP11@-6
AFP11A

and you get different results.

Environment:

Linux "out-of-the-box" RH 6.1
tcsh 6.08 (from RH 6.1, unmodified), no locale set
(LC_ALL=en_US; I also tried with LC_ALL unset, same problem;
yes I know for data like the above it should not make
any difference).

After running this ('file' is the above 10-line file):

sort.52 file > file.52.srt  # using RH's 5.2. sort
sort.61 file > file.61.srt  # RH 6.1 sort
diff file.52.srt file.61.srt

I got this:

2d1
< AFD7#@-6
6a6
> AFD7#@-6


-- Jan Hajic

Comment 1 hajic 1999-11-01 13:08:59 UTC
After getting a reply (and suggestion) from Jim Meyering
<meyering> (after sending a copy of the bug report to
bug-textutils), I tried unsetenv LANG and it helped.
(Unlike unsetenv LC_ALL, which had no effect.) Therefore your en_US
tables (or possibly other as well!) must be corrupted, since they
should not influence the sorting of # in any way, right?

-- Jan Hajic

Comment 2 Preston Brown 2000-01-14 03:45:59 UTC
*** Bug 6762 has been marked as a duplicate of this bug. ***

Comment 3 Preston Brown 2000-01-14 03:46:59 UTC
sort is correctly following the LC_COLLATE settings for en_US.  if you want
POSIX behaviour, you have to request it explicitly (unset LANG/LC_COLLATE, or
set LC_COLLATE=C).


Note You need to log in before you can comment on or make changes to this bug.