[Bug 1081683] Re: sort inconsistent
Moses Moore
1081683 at bugs.launchpad.net
Wed Nov 28 04:55:50 UTC 2012
Confirmed. Thank you.
$ export LC_COLLATE=C; echo -e 'abb\naaa\n.ab' |sort
.ab
aaa
abb
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to eglibc in Ubuntu.
https://bugs.launchpad.net/bugs/1081683
Title:
sort inconsistent
Status in “eglibc” package in Ubuntu:
Won't Fix
Bug description:
In the following examples, I expect /usr/bin/sort to always put '.'
(0x2E) before 'a' (0x61)
$ echo -e 'ab\naa\n.a' |sort
.a
aa
ab
$ echo -e 'aba\naaa\n.aa' |sort
.aa
aaa
aba
$ echo -e 'abb\naaa\n.ab' |sort
aaa
.ab
abb
The difference between examples 2 and 3 is the third byte of each line
is one bit higher, and for some reason this makes the first byte "."
simultaneously after "a" and before "a" in sort order. That's should
be contradictory, and this is repeatable.
This also happens when other punctuation marks are the first byte (remember 'a' is 0x61)
$ echo -e 'abb\naaa\n!ab' |sort # ! = 0x21
$ echo -e 'abb\naaa\n_ab' |sort # _ = 0x5F
$ echo -e 'abb\naaa\n{ab' |sort # { = 0x7B , so not only for bytes that are < 0x61
ProblemType: Bug
DistroRelease: Ubuntu 12.10
Package: coreutils 8.13-3.2ubuntu2
ProcVersionSignature: Ubuntu 3.5.0-18.29-generic 3.5.7
Uname: Linux 3.5.0-18-generic i686
NonfreeKernelModules: nvidia
ApportVersion: 2.6.1-0ubuntu6
Architecture: i386
Date: Wed Nov 21 11:32:54 2012
MarkForUpload: True
SourcePackage: coreutils
UpgradeStatus: Upgraded to quantal on 2012-10-19 (32 days ago)
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/eglibc/+bug/1081683/+subscriptions
More information about the foundations-bugs
mailing list