Bug 18074 - panels are sorted always incasesensitive
Summary: panels are sorted always incasesensitive
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: mc
Version: 7.0
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jonathan Blandford
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2000-10-02 11:21 UTC by Need Real Name
Modified: 2013-04-02 04:14 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2000-10-04 13:25:32 UTC
Embargoed:


Attachments (Terms of Use)

Description Need Real Name 2000-10-02 11:21:22 UTC
Both panels are sorted always incasesensitive no matter if you say so in
Sort order dialog.

Comment 1 Pavel Roskin 2000-10-04 00:55:41 UTC
That's because case sensitive sorting now uses strcoll() but it is not case sensitive in some locales.
I communicated with the author of this patch (Timur I. Bakeyev <timur>)
He insists that the bug is in glibc, not in mc.

Comment 2 Need Real Name 2000-10-04 13:25:30 UTC
strcoll seems to be OK. 
$ cat strcol.c
#include <string.h>

int
main(int argc, char *argv[])
{
        printf("%d %s %s\n",strcoll(argv[1], argv[2]), argv[1], argv[2]);
        return 0;
}
$ ./strcol abcd Abcd
1 abcd Abcd
$ ./strcol bbcd Abcd
1 bbcd Abcd
$ ./strcol Abcd abcd
-1 Abcd abcd
$ ./strcol Abcd bbcd
-1 Abcd bbcd
(using the same locales as in mc, ale without locales setting, so unset LC_CTYPE
and export LANG=en_US the behavior is the same, originally after instalation, no
changes made) 
So for me it seems to be OK. Also if you say Case sensitive sort it strips
all non alphanum characters from the beginning of filename.
So it looks like this:
/bin 
/.cdda
/.cedit
/.dia
/doc
/.dosemu
/.gimp
/GNUstep
/.gphoto
/mail
...
Here is part of ~/.mc/ini:
[New Left Panel]
display=listing
reverse=0
case_sensitive=1
sort_order=name
list_mode=full
user_format=half type,name,|,size,|,perm
mini_status_format=half type,name,|,size,|,perm
user_mini_status=0
user_status0=half type,name,|,size,|,perm
user_status1=half type,name,|,size,|,perm
user_status2=half type,name,|,size,|,perm
user_status3=half type,name,|,size,|,perm
user_status4=half type,name,|,size,|,perm


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