Summary: | Dolphin name grouping feature doesn't work with cyrillic names | ||
---|---|---|---|
Product: | [Applications] dolphin | Reporter: | Andrey Kozlovskiy <akozlovskiy119> |
Component: | view-engine: general | Assignee: | Dolphin Bug Assignee <dolphin-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | andreyyashkin, elvis.angelaccio, nate |
Priority: | NOR | Keywords: | junior-jobs |
Version: | 19.04.0 | ||
Target Milestone: | --- | ||
Platform: | Neon | ||
OS: | Linux | ||
Latest Commit: | https://commits.kde.org/dolphin/dc586ada63d1822fbbe38a0dd3449c73b03928e0 | Version Fixed In: | 19.11.80 |
Sentry Crash Report: | |||
Attachments: |
Russian folders with different first letters in single 'A' group
Grouping works fine with some non-latin chars |
Indeed the latin letter range 'A'...'Z' is hardcoded, see https://cgit.kde.org/dolphin.git/tree/src/kitemviews/kfileitemmodel.cpp#n1899 We could add (at least) greek and cyrillic letter ranges. Created attachment 120098 [details]
Grouping works fine with some non-latin chars
Sorry, forgot to mention that not all non-latin symbols maps to latin A..Z. That's why I only wrote about cyrillic names.
Greek symbols works fine for me, also chinese and japanese, for example.
It turned out that the problem depends on the language. For example, grouping works fine with English (GB and US) and German, but not with Russian (ru_RU.UTF-8). Run dolphin with LANGUAGE variable to test:
> LANGUAGE="en_US.UTF-8" dolphin
For some reason QCollator thinks that cyrillic(or at least russian) symbols are less than latin characters, while the code seems to be written with the assumption than they are bigger. I made a patch to consider such case. https://phabricator.kde.org/D22303 Git commit dc586ada63d1822fbbe38a0dd3449c73b03928e0 by Elvis Angelaccio, on behalf of Andrey Yashkin. Committed on 28/07/2019 at 15:07. Pushed by elvisangelaccio into branch 'master'. Fix name grouping feature for cyrillic names Summary: All files and folders with cyrillic names are placed in latin 'A' group. This patch fixes this issue. FIXED-IN: 19.11.80 Test Plan: Make grouping by name in the dir with cyrillic files or dirs in it. See screenshots below. Before {F6985465} After {F6985459} Reviewers: #dolphin, ngraham, cfeck, elvisangelaccio Reviewed By: #dolphin, ngraham, elvisangelaccio Subscribers: hein, cfeck, ngraham, elvisangelaccio, kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D22303 M +2 -24 src/kitemviews/kfileitemmodel.cpp https://commits.kde.org/dolphin/dc586ada63d1822fbbe38a0dd3449c73b03928e0 Git commit e9d8bab20bdc99996aa43beefdd038483a4c02d8 by Elvis Angelaccio, on behalf of Andrey Yashkin. Committed on 28/07/2019 at 20:14. Pushed by elvisangelaccio into branch 'master'. Fix name grouping feature for cyrillic names Summary: All files and folders with cyrillic names are placed in latin 'A' group. This patch fixes this issue. Test Plan: Make grouping by name in the dir with cyrillic files or dirs in it. See screenshots below. Before {F6985465} After {F6985459} Reviewers: #dolphin, ngraham, cfeck, elvisangelaccio Reviewed By: #dolphin, ngraham, elvisangelaccio Subscribers: hein, cfeck, ngraham, elvisangelaccio, kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D22303 M +24 -17 src/kitemviews/kfileitemmodel.cpp https://commits.kde.org/dolphin/e9d8bab20bdc99996aa43beefdd038483a4c02d8 Git commit b8849f74aab2e22cc1b891c7dcf4f759fb523ea9 by Elvis Angelaccio. Committed on 28/07/2019 at 20:14. Pushed by elvisangelaccio into branch 'master'. Revert "Fix name grouping feature for cyrillic names" This reverts commit dc586ada63d1822fbbe38a0dd3449c73b03928e0. D22303 had a wrong diff. M +24 -2 src/kitemviews/kfileitemmodel.cpp https://commits.kde.org/dolphin/b8849f74aab2e22cc1b891c7dcf4f759fb523ea9 |
Created attachment 119619 [details] Russian folders with different first letters in single 'A' group All files and folders with cyrillic names are placed in latin 'A' group. They're expected to be in groups according to their first letter. See screenshot with russian names for example. STEPS TO REPRODUCE 1. Create some files with cyrillic names 2. Select View -> Sort By -> Names 3. Enable View -> Show in groups