After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 631504 - Sorting has issues with accents
Sorting has issues with accents
Status: RESOLVED FIXED
Product: Gnumeric
Classification: Applications
Component: General
1.10.x
Other All
: Normal normal
: ---
Assigned To: Jody Goldberg
Jody Goldberg
Depends on:
Blocks:
 
 
Reported: 2010-10-06 09:05 UTC by Snark
Modified: 2010-10-06 21:04 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Proposed patch. (644 bytes, patch)
2010-10-06 12:53 UTC, Jean Bréfort
none Details | Review
Enhanced patch. (3.21 KB, patch)
2010-10-06 19:17 UTC, Jean Bréfort
none Details | Review
fixed patch (3.21 KB, patch)
2010-10-06 19:43 UTC, Jean Bréfort
none Details | Review
new revised patch (2.38 KB, patch)
2010-10-06 20:34 UTC, Jean Bréfort
none Details | Review

Description Snark 2010-10-06 09:05:49 UTC
I just noticed that for gnumeric, 'î' comes after 'r' in alphabetical order... which is very wrong!
Comment 1 Jean Bréfort 2010-10-06 09:35:44 UTC
In french locale this only occurs for case insensitive sorting. In "C" locale, it always occur.
Comment 2 Morten Welinder 2010-10-06 12:18:54 UTC
Snark: what is your locale?

Please show the output of the "locale" command.
Comment 3 Jean Bréfort 2010-10-06 12:40:53 UTC
The issue is in go_string_cmp_ignorecase. It should call g_utf8_collate instead of strcmp. Of course, we should call g_utf8_collate_key at some point.
Comment 4 Jean Bréfort 2010-10-06 12:53:46 UTC
Created attachment 171826 [details] [review]
Proposed patch.

Do we really need to store the string case insensitive version? If yes, the patch is not what we want.
Comment 5 Snark 2010-10-06 13:28:56 UTC
$ locale
LANG=fr_FR.UTF-8
LC_CTYPE="fr_FR.UTF-8"
LC_NUMERIC="fr_FR.UTF-8"
LC_TIME="fr_FR.UTF-8"
LC_COLLATE="fr_FR.UTF-8"
LC_MONETARY="fr_FR.UTF-8"
LC_MESSAGES="fr_FR.UTF-8"
LC_PAPER="fr_FR.UTF-8"
LC_NAME="fr_FR.UTF-8"
LC_ADDRESS="fr_FR.UTF-8"
LC_TELEPHONE="fr_FR.UTF-8"
LC_MEASUREMENT="fr_FR.UTF-8"
LC_IDENTIFICATION="fr_FR.UTF-8"
LC_ALL=
Comment 6 Jean Bréfort 2010-10-06 19:17:08 UTC
Created attachment 171843 [details] [review]
Enhanced patch.
Comment 7 Morten Welinder 2010-10-06 19:33:26 UTC
Review of attachment 171843 [details] [review]:

Close.

GO_STRING_HAS_CASEFOLDED_COLLATE is the same as GO_STRING_HAS_CASEFOLD.  I don't think that
will work.

Then go_string_get_casefold is going to have clear 
GO_STRING_HAS_CASEFOLDED_COLLATE being it will overwrite the string.
Comment 8 Morten Welinder 2010-10-06 19:35:58 UTC
This code is getting a tad complicated.
Comment 9 Jean Bréfort 2010-10-06 19:43:14 UTC
Created attachment 171845 [details] [review]
fixed patch
Comment 10 Jean Bréfort 2010-10-06 20:34:21 UTC
Created attachment 171848 [details] [review]
new revised patch
Comment 11 Jean Bréfort 2010-10-06 21:04:36 UTC
This problem has been fixed in our software repository. The fix will go into the next software release. Thank you for your bug report.