Hello !

I am using this version of 'sort' shipped with RedHat Linux 7.1:

"
[15] 17:06 [EMAIL PROTECTED]:/home/sergei> which sort
/bin/sort
[16] 17:06 [EMAIL PROTECTED]:/home/sergei> /bin/sort --version
sort (GNU textutils) 2.0.11
Written by Mike Haertel.

Copyright (C) 2000 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
[17] 17:07 [EMAIL PROTECTED]:/home/sergei> 
".

I am trying to sort this file:
"
[18] 17:07 [EMAIL PROTECTED]:/home/sergei/work> cat Ba.txt 
B
a
[19] 17:07 [EMAIL PROTECTED]:/home/sergei/work> 
".

Applying 'sort' to it produces this output:

"
[19] 17:07 [EMAIL PROTECTED]:/home/sergei/work> /bin/sort Ba.txt 
a
B
[20] 17:08 [EMAIL PROTECTED]:/home/sergei/work
".

I believe the behavior is wrong since in ASCII code 'B', the CAPITAL letter
comes BEFORE 'a' - small letter.

For example, Perl built-in 'sort' behaves correctly regarding  this issue:

"
[24] 17:10 [EMAIL PROTECTED]:/home/sergei/work> cat Ba.txt
B
a
[25] 17:11 [EMAIL PROTECTED]:/home/sergei/work> perl -e 'print sort 
`cat Ba.txt`'
B
a
[26] 17:11 [EMAIL PROTECTED]:/home/sergei/work> 
"
 - correct, 'B' is before 'a';

"
[26] 17:11 [EMAIL PROTECTED]:/home/sergei/work> cat ba.txt 
b
a
[27] 17:12 [EMAIL PROTECTED]:/home/sergei/work> perl -e 'print sort 
`cat ba.txt`'
a
b
[28] 17:12 [EMAIL PROTECTED]:/home/sergei/work> 
"

- also correct, 'a' is before 'b'.

If you agree with me that this is a bug, would you please fix it ?

Also, I can fix the source myself, but I would like to be advised on how many
places in the source code can be affected.

Thanks in advance,
  Sergei.



_______________________________________________
Bug-textutils mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-textutils

Reply via email to