diff options
Diffstat (limited to 'e-util/e-util.c')
-rw-r--r-- | e-util/e-util.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/e-util/e-util.c b/e-util/e-util.c index 05bfdb4c0f..c27e2a60d8 100644 --- a/e-util/e-util.c +++ b/e-util/e-util.c @@ -98,14 +98,25 @@ e_str_compare (gconstpointer x, gconstpointer y) gint e_str_case_compare (gconstpointer x, gconstpointer y) { + gchar *cx, *cy; + gint res; + if (x == NULL || y == NULL) { if (x == y) return 0; else return x ? -1 : 1; } - - return g_utf8_collate (g_utf8_casefold (x, -1), g_utf8_casefold (y, -1)); + + cx = g_utf8_casefold (x, -1); + cy = g_utf8_casefold (y, -1); + + res = g_utf8_collate (cx, cy); + + g_free (cx); + g_free (cy); + + return res; } gint |