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