Bug 428578 - The filename extension is used for sorting the filename
Summary: The filename extension is used for sorting the filename
Status: RESOLVED WORKSFORME
Alias: None
Product: digikam
Classification: Applications
Component: Albums-ItemsSort (show other bugs)
Version: 7.2.0
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-11-01 21:22 UTC by hsonnenschein
Modified: 2022-02-20 08:46 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 7.2.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description hsonnenschein 2020-11-01 21:22:36 UTC
Hello,
The following error occurs whith sorting files: the filename extension is also used for sorting the filename. A JPG image named Bild1a.jpg is displayed in front of the Bild1.jpg. An image1k.jpg is displayed after image1.jpg.
The filname extesion should not be a part of sorting.
Greetings Harald


SOFTWARE/OS VERSIONS
Windows: 10
Comment 1 Maik Qualmann 2020-11-01 21:42:44 UTC
The sorting works completely correctly under Linux (not AppImage) and Windows. The sorting in your example is:

Bild1.jpg
Bild1a.jpg
image1.jpg
image1k.jpg

In addition, the extension is very much a part of the file name. Or how should images be sorted as Bild.jpg and Bild.dng?

Maik
Comment 2 Maik Qualmann 2020-11-01 21:50:18 UTC
You may have missed a space in a file name or the file names contain characters from the extended charset of UTF-8.

Maik
Comment 3 hsonnenschein 2020-11-02 20:32:54 UTC
Hello Maik,
The DigiKam version I used was DigiKam 7.2.0-beta1.
The sort order in my example is:
Image1a.jpg
Image1.jpg
Image1k.jpg

By sorting the file extetion I mean that first the file name without the file extension and then the file extension should be sorted.
I don't know how to describe it better.
Greetings Harald
Comment 4 Maik Qualmann 2020-11-02 21:25:21 UTC
No, the sort order is correct here:

Image1.jpg
Image1a.jpg
Image1k.jpg

Please create a ZIP file with these 3 files and upload it, or send it to me as a private mail.

To be sure, we're not talking about the AppImage? You specified Windows as the platform. In the AppImage is the sorting due to the faulty locale support, as you describe it. The behavior is correct in the native Linux and Windows version.

Maik
Comment 5 Maik Qualmann 2020-11-02 22:12:07 UTC
In current digiKam versions we use a new one QCollatorSortKey cache. This behaves a little differently under Windows than Linux. You have to set the string comparison to "natural" in the digiKam settings under miscellaneous. Then the sort result is what it should be.

Maik