mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user