1
0
mirror of https://gitlab.gnome.org/GNOME/glib.git synced 2025-07-27 20:33:28 +02:00

Stop using deprecated g_unicode_canonical_decomposition()

https://bugzilla.gnome.org/show_bug.cgi?id=654948
This commit is contained in:
Vincent Untz
2011-07-20 09:22:12 +02:00
parent 33c977917c
commit 4e213f385b

@@ -855,15 +855,14 @@ real_toupper (const gchar *str,
* which could simplify this considerably. * which could simplify this considerably.
*/ */
gsize decomp_len, i; gsize decomp_len, i;
gunichar *decomp; gunichar decomp[4];
decomp = g_unicode_canonical_decomposition (c, &decomp_len); decomp_len = g_unichar_fully_decompose (c, FALSE, decomp, 4);
for (i=0; i < decomp_len; i++) for (i=0; i < decomp_len; i++)
{ {
if (decomp[i] != 0x307 /* COMBINING DOT ABOVE */) if (decomp[i] != 0x307 /* COMBINING DOT ABOVE */)
len += g_unichar_to_utf8 (g_unichar_toupper (decomp[i]), out_buffer ? out_buffer + len : NULL); len += g_unichar_to_utf8 (g_unichar_toupper (decomp[i]), out_buffer ? out_buffer + len : NULL);
} }
g_free (decomp);
len += output_marks (&p, out_buffer ? out_buffer + len : NULL, TRUE); len += output_marks (&p, out_buffer ? out_buffer + len : NULL, TRUE);