Bug 798679 - Unicode normalization should be used for comparison but not stored.

Change to NFC normalization for all comparisons because the Unicode
meaning of compatible might collide with the user's intent.
This commit is contained in:
John Ralls
2023-01-04 13:19:36 -08:00
parent 797098c6e5
commit b922cfd78d
5 changed files with 9 additions and 9 deletions

View File

@@ -61,11 +61,11 @@ qof_utf8_substr_nocase (const gchar *haystack, const gchar *needle)
haystack_casefold = g_utf8_casefold (haystack, -1);
haystack_normalized = g_utf8_normalize (haystack_casefold, -1,
G_NORMALIZE_ALL);
G_NORMALIZE_NFC);
g_free (haystack_casefold);
needle_casefold = g_utf8_casefold (needle, -1);
needle_normalized = g_utf8_normalize (needle_casefold, -1, G_NORMALIZE_ALL);
needle_normalized = g_utf8_normalize (needle_casefold, -1, G_NORMALIZE_NFC);
g_free (needle_casefold);
p = strstr (haystack_normalized, needle_normalized);