Dolphin not group folders when names not in English http://i.imgur.com/03N6gG3.png Reproducible: Always Steps to Reproduce: 1. open dolphin 2. sort by name 3. apply grouping for filenames Actual Results: All non eng filenames in one group "all others" Expected Results: Group files by first letter Dolphin 2.1 KDE 4.9.4 LinuxMint 14 (Nadia) Linux adwork 3.5.0-23-generic #35-Ubuntu SMP Thu Jan 24 13:15:40 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
Thanks for the bug report! I do have some ideas how this issue could be fixed, but it would be helpful to have some test data. Could you attach an archive that contains some non-English file names? Thanks for your help.
Created attachment 77662 [details] archive with non-English file names filenames for testing
Thanks for the file names, I can reproduce the problem and will have a look.
(In reply to comment #3) > Thanks for the file names, I can reproduce the problem and will have a look. Hello Frank, the problem is located in KFileItemModel::nameRoleGroups(): if (newFirstChar >= QLatin1Char('A') && newFirstChar <= QLatin1Char('Z')) { // Apply group 'A' - 'Z' Is there a better way to test the first char? Maybe somewhere in kdelibs? That would be awesome :)
Created attachment 77836 [details] Suggested fix @Emmanuel: I had been thinking about this issue during the last days, and I think I found a solution. Feel free to test and report any problems with the patch here. I think I'll try to ask more international users to test and see if this works and does not break anything.
(In reply to comment #5) Works great with the provided test folders. One problem I have found is, that it doesn't use german umlaute (Ä, Ö and Ü) for the grouping header title, instead Dolphin uses A, O and U.
(In reply to comment #6) > One problem I have found is, that it doesn't use german umlaute (Ä, Ö and Ü) > for the grouping header title, instead Dolphin uses A, O and U. This is actually intentional, and it even works like that in the current code. That is, with one small exception: If there are two files "A" and "Ä", they will be put into a common group "A", but if there is only "Ä", the group is called "Others". There is a TODO comment in the current code about this issue.
How to make a patch test? Does it make sense to connect the repo ppa: kubuntu-ppa/batskports or need to compile?
(In reply to comment #8) > How to make a patch test? Does it make sense to connect the repo ppa: > kubuntu-ppa/batskports No, you have to build Dolphin from source to test it, sorry.
Regarding the TODO: You should be able to "decompose" the character, which should split it into a character and diacritical marks. Unicode standard defines the decomposition and the Qt library implements it in the QChar.decomposition() method. You first want to make the letter upper case and then decomposed. The decomposition is not always a single character plus diacritical marks. The German small letter sharp "S" (U+00DF) when made upper case is "SS" (two letters S), so you would need to extract all letters from the "decomposed" string in order to make a group without diacritical marks.
For more details there is a text in Unicode Standard: http://unicode.org/reports/tr15/
(In reply to comment #10) Thanks for the detailed explanations. Note that the proposed patch only aims to fix some of the existing problems, it's certainly not perfect. I don't have much detailed Unicode knowledge, which is one of the reasons why I'm afraid that the approach you propose would require quite a lot of work. Considering that "Group by Name" for non-ASCII file names has been broken for quite some time before that has been reported, further work on this does currently not have a high priority for me, to be honest. However, if anyone else is willing to make further improvements, that would definitely be welcome. At the moment, I'm mostly trying to find out if the proposed patch causes any regressions.
Sorry for the dumb question, I never compiled KDE components... It will help me to apply the patch? ``` a="$HOME/kde-git"; mkdir "$a" ; cd "$a" ;sudo apt-get install git-core build-essential libkactivities-dev ; sudo apt-get build-dep dolphin ; git clone git://anongit.kde.org/kde-baseapps ; cd kde-baseapps ; mkdir build ; cd build; cmake -DCMAKE_INSTALL_PREFIX=`kde4-config --prefix` .. ; make -j3 ; cd dolphin/src/ ; ./dolphin ```
(In reply to comment #13) > Sorry for the dumb question, I never compiled KDE components... It will help > me to apply the patch? > ``` > a="$HOME/kde-git"; mkdir "$a" ; cd "$a" ;sudo apt-get install git-core > build-essential libkactivities-dev ; sudo apt-get build-dep dolphin ; git > clone git://anongit.kde.org/kde-baseapps ; cd kde-baseapps ; mkdir build ; > cd build; cmake -DCMAKE_INSTALL_PREFIX=`kde4-config --prefix` .. ; make -j3 > ; cd dolphin/src/ ; ./dolphin Sorry for the late response. These steps look reasonable for building the latest Dolphin from master. I see that you don't run 'make install', but you can just run Dolphin from the build folder. If you want to apply a patch, cd to the source folder kde-baseapps/, then enter patch -p1 < /path/to/patch_file.diff and repeat the "cd build; make -j3" steps. Note that the patch is for the KDE/4.10 branch, but it should also apply to master. If that is not the case, do "git reset --hard HEAD && git checkout KDE/4.10" before applying the patch. Thanks for your help!
Git commit 02f4a69f58fef89ec6df4c6775be1e8d4b9d40b2 by Frank Reininghaus. Committed on 26/03/2013 at 01:21. Pushed by freininghaus into branch 'KDE/4.10'. Improve grouping by name for non-ASCII file names This commit prevents that all non-ASCII letters which are not umlauts are grouped in a single group "Others", and that the joint group of an ASCII letter and the associated umlaut in some locales is called "Others" if there is only the umlaut in the group. REVIEW: 109457 FIXED-IN: 4.10.2 M +28 -21 dolphin/src/kitemviews/kfileitemmodel.cpp http://commits.kde.org/kde-baseapps/02f4a69f58fef89ec6df4c6775be1e8d4b9d40b2