From: Mikael Magnusson Date: Thu, 13 Aug 2015 01:58:08 +0000 (+0200) Subject: Normalize all incoming UTF-8 to NFC X-Git-Url: http://git.openbox.org/?a=commitdiff_plain;h=c47abb3b1eb7a53766ae2426b4eaa56f4ca3fd1c;p=mikachu%2Fopenbox.git Normalize all incoming UTF-8 to NFC --- diff --git a/obt/prop.c b/obt/prop.c index fad6f9b0..706ca333 100644 --- a/obt/prop.c +++ b/obt/prop.c @@ -411,7 +411,7 @@ static void* convert_text_property(XTextProperty *tprop, const gchar *end; /* the first byte past the valid data */ g_utf8_validate(retlist[i], -1, &end); - retlist[i] = g_strndup(retlist[i], end-retlist[i]); + retlist[i] = g_utf8_normalize(retlist[i], end-retlist[i], G_NORMALIZE_NFC); } else if (encoding == LOCALE) { gsize nvalid; /* the number of valid bytes at the front of the