Bug 217814 - KMail is not honouring the LC_COLLATE setting when sorting folder list
Summary: KMail is not honouring the LC_COLLATE setting when sorting folder list
Status: REPORTED
Alias: None
Product: kmail2
Classification: Applications
Component: general (show other bugs)
Version: 5.2.3
Platform: Ubuntu Unspecified
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-12-08 04:34 UTC by mdhirsch
Modified: 2019-01-10 20:37 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
screenshot of kmail folders in case-insensitive alpha order (25.94 KB, image/png)
2017-06-29 16:34 UTC, mdhirsch
Details

Note You need to log in before you can comment on or make changes to this bug.
Description mdhirsch 2009-12-08 04:34:41 UTC
Version:            (using KDE 4.3.4)
Installed from:    Ubuntu Packages

In some sense this is a dup of bug 211531 https://bugs.kde.org/show_bug.cgi?id=211531, but that one is about Dolphin and I wanted the KMail people to know about it, too.

When LC_COLLATE is set to "POSIX" or "C" sorting is supposed to be done in ASCII order.  In particular, this is case-sensitive with the uppercase letters coming before the lowercase letters.  This can be easily demostrates with the "ls" command.  Running "ls" with LC_COLLATE=POSIX will sort the filenames in case-sensitive order.

The sorting of my mail folders in kmail is in case-insensitive order, even though I have my LC_COLLATE variable set to POSIX.  The locale standards indicate that it should be in case-sensitive order.

This worked correctly in KDE 3.5.
Comment 1 ray 2010-01-11 09:05:53 UTC
This behaviour has been maintained throughout KDE4

I tried to report this in bug 199244, but it was dismissed as a duplicate of a KDE2 bug 38039  marked as "WONTFIX".
Comment 2 huntj 2010-03-22 00:27:19 UTC
Version : KDE 4.3.5 
shipped with Suse 11.2

KDE should give an option to honour LC_COLLATE.

The current behaviour is awful when files are supposed to
be sorted according to LC_COLLATE=POSIX convention.
Comment 3 Laurent Montel 2015-04-12 10:27:10 UTC
Thank you for taking the time to file a bug report.

KMail2 was released in 2011, and the entire code base went through significant changes. We are currently in the process of porting to Qt5 and KF5. It is unlikely that these bugs are still valid in KMail2.

We welcome you to try out KMail 2 with the KDE 4.14 release and give your feedback.
Comment 4 mdhirsch 2015-04-14 01:24:56 UTC
I have changed it to kmail2 since you say that kmail is no longer valid.  I am using kmail 4.14.1 as included in kontact 4.14.1 in KDE 4.14.1 in Kubuntu.  Since this is actively maintained I assume that this corresponds to kmail2, though I don't know how to check.

The bug is certainly still there in kmail 4.14.1, as well as in all the rest of KDE like dolphin.
Comment 5 mdhirsch 2015-04-14 01:25:41 UTC
I put this in the general category because it is also seen in sorting the messages, not just in sorting the folders.
Comment 6 Denis Kurz 2017-06-23 20:00:23 UTC
This bug has never been confirmed for a KDE PIM version that is based on KDE Frameworks (5.x). Those versions differ significantly from the old 4.x series. Therefore, I plan to close it in around two or three months. In the meantime, it is set to WAITINGFORINFO to give reporters the oportunity to check if it is still valid. As soon as someone confirms it for a recent version (at least 5.1, ideally even more recent), I'll gladly reopen it.

Please understand that we lack the manpower to triage bugs reported for versions almost two years beyond their end of life.
Comment 7 mdhirsch 2017-06-29 16:34:38 UTC
Created attachment 106372 [details]
screenshot of kmail folders in case-insensitive alpha order

This image shows the kmail folders in case-insensitive alphabetical order.  The specification for the LC_COLLATE settings of POSIX or C specify a case-sensitive ordering--basically ASCII ordering.  All the uppercase letters should be sorted before all the lowercase letters.  In the image you can see that there are folders starting with lowercase letters sorted in among the folders starting with uppercase letters.
Comment 8 mdhirsch 2017-06-29 16:38:39 UTC
I can confirm this bug on KMail 5.2.3.  In a konsole window I explicitly set my LC_COLLATE to POSIX (and I also tested C) then ran kontact which includes kmail.  The screenshot I uploaded in comment 7 comes from that.  You can see in the screenshot that lowercase folder names are sorted in with uppercase folder names.  The POSIX collating spec says that ASCII order should be used.  One effect of ASCII ordering is that all uppercase letters come before all lowercase letters.

Do please reopen this defect.
Comment 9 Christoph Feck 2017-07-15 01:30:51 UTC
Thanks for the update; changing status.
Comment 10 Boian Berberov 2019-01-10 20:37:52 UTC
Possibly related to bug 211531

Potential fix in Qt 5.12.1: https://bugreports.qt.io/browse/QTBUG-58621