Fix quickfill for unicode strings with accents
Didier Vidal
didier-devel at 9online.fr
Sat Oct 1 07:57:37 EDT 2005
Current behaviour of quickfill is not appropriate for UTF-8 string that
contain accents.
The reference strings are stored in a 'normalized form' that transforms
a single letter (letter + accent) in two letters (the letter, then the
accent). This has side effects, in the quick fill that is returned and
displayed (é is displayed e'), accounts that are not recognized etc...
NORMALIZE_NFC provides a much more usable behaviour.
More info about utf-8 normalization modes can be found at
http://developer.gnome.org/doc/API/2.0/glib/glib-Unicode-Manipulation.html#GNormalizeMode
Didier.
------------------------------------
prompt> cvs -q diff -u
Index: QuickFill.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome-utils/QuickFill.c,v
retrieving revision 1.1.4.3
diff -u -r1.1.4.3 QuickFill.c
--- QuickFill.c 22 Jul 2005 18:53:01 -0000 1.1.4.3
+++ QuickFill.c 1 Oct 2005 11:51:31 -0000
@@ -266,7 +266,7 @@
if (NULL == text) return;
- normalized_str = g_utf8_normalize (text, -1, G_NORMALIZE_DEFAULT);
+ normalized_str = g_utf8_normalize (text, -1, G_NORMALIZE_NFC);
quickfill_insert_recursive (qf, normalized_str, 0, sort);
g_free (normalized_str);
}
More information about the gnucash-patches
mailing list