Bug 181211 - Alphabetical sorting and "_"
Summary: Alphabetical sorting and "_"
Status: RESOLVED FIXED
Alias: None
Product: kdelibs
Classification: Unmaintained
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Unspecified
: NOR normal
Target Milestone: ---
Assignee: Peter Penz
URL:
Keywords:
: 191865 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-01-18 19:18 UTC by mathesis
Modified: 2010-02-21 18:18 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description mathesis 2009-01-18 19:18:37 UTC
Version:            (using Devel)
Installed from:    Compiled sources

How to reproduce:
- Under the same folder, create these 3 files: a_a, aa and a_b;
- Sort by name the files in your folder (with Dolphin).
Result: the sorting is a_a then aa and finally a_b.

Normal behaviour: a_a then a_b and finally aa (in case "_" is considered as being before the letter "a") or  aa then a_a and finally a_b (in case "_" is considered as being after the letter "z").

I don't know what is the order of precedence between letter a-z/A-Z and other (special) characters and if this is also applicable to others characters.
Comment 1 Peter Penz 2009-01-18 23:15:17 UTC
Thanks for the report, but I cannot reproduce this issue: Dolphin sorts it correctly this way:

aa
a_a
a_b

Did you check whether you've activated 'Sort by Name'?
Comment 2 mathesis 2009-01-18 23:36:49 UTC
Very strange, doing what I described I have the same result than you.

Nevertheless, I have an MP3 folder with (so I still have this bug):
queen__radio_ga_ga.mp3
queens_of_the_stone_age__no_one_knows.mp3
queen__somebody_to_love_live.mp3
(in this order and with 'Sort by Name' - I clicked on the name column to do so).
Comment 3 Peter Penz 2009-01-19 10:04:07 UTC
Hm, very strange: Yes, with queen... a wrong ordering is done. I'll have a look on this :-)
Comment 4 Peter Penz 2009-05-07 23:54:42 UTC
*** Bug 191865 has been marked as a duplicate of this bug. ***
Comment 5 Peter Penz 2009-05-08 00:43:03 UTC
SVN commit 965099 by ppenz:

Added test cases for bug 191865 and 181211. The tests pass -> the root cause of the issue seems to be in the used proxy model. I'll check this during the next week...

CCBUG: 191865
CCBUG: 181211

 M  +9 -0      kstringhandlertest.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=965099
Comment 6 Peter Penz 2009-05-08 11:31:28 UTC
Update: This seems to be a glibc issue :-( See discussion at http://lists.kde.org/?l=kde-devel&m=124174284926086&w=2 for details...
Comment 7 mathesis 2009-12-28 17:35:19 UTC
Hi Peter,

Any news about this issue?
I understand that KDE team cannot do so much because it is related to glibc, so who can?
Comment 8 Peter Penz 2010-01-05 10:59:34 UTC
For KDE SC 4.5 I try to do mainly polishing in Dolphin/kdelibs and this is one top prio issue I'll try to bypass in kdelibs. Also a little bit related beside the sorting is the wrapping of filenames, that contain '_' characters... In KDE 3 the _ have been handled like spaces or dots for wrapping, in KDE 4 they are handled like letters which often leads to a bad wrapping of filenames. I'd also like to fix the wrapping.
Comment 9 Peter Penz 2010-02-21 18:16:03 UTC
SVN commit 1093884 by ppenz:

Fix sorting issues of bugs 181211 and 201101. Thanks to Todd for the patch!

BUG: 201101
BUG: 181211
CCMAIL: toddrme2178@gmail.com

 M  +11 -2     kstringhandler.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1093884
Comment 10 Peter Penz 2010-02-21 18:18:50 UTC
SVN commit 1093886 by ppenz:

Backport of SVN commit  1093884 (should be part of KDE SC 4.4.1): Fix sorting issues of bugs 181211 and 201101. Thanks to Todd for the patch!

CCBUG: 201101
CCBUG: 181211
CCMAIL: toddrme2178@gmail.com

 M  +11 -2     kstringhandler.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1093886