GNOME Bugzilla – Bug 421486
Search should normalize unicode strings
Last modified: 2008-04-05 16:58:52 UTC
Search should normalize unicode strings to match on equivalent characters compositions. Example: I have a file named Bisé. My keyboard layout has combining diacritics so I type <U+0065 LATIN SMALL LETTER E;U+0301 COMBINING ACUTE ACCENT> instead of <U+00E9 LATIN SMALL LETTER E WITH ACUTE>. If I search "Bisé" with combining diacritics nothing is found although "Bisé" with precomposed characters should match.
Created attachment 85122 [details] [review] normalizing and using g_utf8_strdown instead of g_ascii_strdown Here's a patch normalizing the query strings as well as using Unicode lowercase instead of juste ASCII (Bug 421512).
The only possibly undesirable effect is that search "bise" or "Bise" will match "Bisé" and "Bisé". It's only if it's at the end of the string. I don't know how it would be fixed at the moment.
Thanks, it's on HEAD: 2007-06-18 Martin Wehner <martin.wehner@gmail.com> * libnautilus-private/nautilus-search-engine-simple.c: (search_thread_data_new), (search_visit_func): Normalize unicode search strings and use g_utf8_strdown to lowercase them. (#421486/#421512) Patch from Denis Jacquerye <moyogo@gmail.com>
fixing patch status.