sort order
Pavel Roskin
proski at gnu.org
Wed Jul 23 21:58:55 UTC 2003
On Wed, 23 Jul 2003, Koblinger Egmont wrote:
> mc sorts the files in standard ascii order (strcmp() instead of strcoll()).
>
> IMHO it would be better if it sorted them according to the current
> locale. This way those who don't like this still can set LC_COLLATE=C to
> revert the current behavior.
The problem is that the option for case sensitive search was implemented
before the issue with locales came up. Old versions of mc used strcoll()
for case-sensitive sort, but then strcoll() became case-insensitive in
some locales. There were complaints that the option didn't work.
Also, hidden and non-hidden files became mixed together in some locales.
Even if the locale doesn't take leading dots into account, it's still
convenient for the file manager to keep hidden files grouped together.
Currently, mc tests if strcoll() is case sensitive and uses it for case
sensitive or non-case-sensitive sort dependent on its behavior. This is a
kludge, but I don't know of any proposal how to do it better.
I'll appreciate if you explain your suggestion a little bit more. In
particular, I don't understand whether you are suggesting to remove the
"case sensitive" checkbox in the "Sort Order" dialog. I think some users
may not like it, especially on Windows.
Also, I think some users would like to group hidden files together
regardless of the locale rules. I'd like to see this issue addressed in
your proposal.
--
Regards,
Pavel Roskin
More information about the mc-devel
mailing list