41 lines
1.2 KiB
Text
41 lines
1.2 KiB
Text
$NetBSD: patch-e_data_server_util_c,v 1.1 2012/02/06 10:44:44 drochner Exp $
|
|
|
|
In glib 2.30 G_UNICODE_COMBINING_MARK became known as
|
|
G_UNICODE_SPACING_MARK, and g_unicode_canonical_decomposition was
|
|
deprecated in favour of g_unichar_fully_decompose.
|
|
|
|
--- libedataserver/e-data-server-util.c.orig 2011-04-21 19:35:37.000000000 +0000
|
|
+++ libedataserver/e-data-server-util.c
|
|
@@ -245,7 +245,7 @@ e_util_utf8_strstrcase (const gchar *hay
|
|
static gunichar
|
|
stripped_char (gunichar ch)
|
|
{
|
|
- gunichar *decomp, retval;
|
|
+ gunichar decomp[4], retval;
|
|
GUnicodeType utype;
|
|
gsize dlen;
|
|
|
|
@@ -255,14 +255,23 @@ stripped_char (gunichar ch)
|
|
case G_UNICODE_CONTROL:
|
|
case G_UNICODE_FORMAT:
|
|
case G_UNICODE_UNASSIGNED:
|
|
+#ifdef G_UNICODE_COMBINING_MARK
|
|
case G_UNICODE_COMBINING_MARK:
|
|
+#endif
|
|
+#ifdef G_UNICODE_SPACING_MARK
|
|
+ case G_UNICODE_SPACING_MARK:
|
|
+#endif
|
|
/* Ignore those */
|
|
return 0;
|
|
default:
|
|
/* Convert to lowercase, fall through */
|
|
ch = g_unichar_tolower (ch);
|
|
case G_UNICODE_LOWERCASE_LETTER:
|
|
+#ifdef G_UNICODE_COMBINING_MARK
|
|
if ((decomp = g_unicode_canonical_decomposition (ch, &dlen))) {
|
|
+#else
|
|
+ if ((dlen = g_unichar_fully_decompose(ch, FALSE, decomp, 4))) {
|
|
+#endif
|
|
retval = decomp[0];
|
|
g_free (decomp);
|
|
return retval;
|