After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 421486 - Search should normalize unicode strings
Search should normalize unicode strings
Status: RESOLVED FIXED
Product: nautilus
Classification: Core
Component: File Search Interface
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Nautilus Maintainers
Nautilus Maintainers
Depends on:
Blocks: 423036
 
 
Reported: 2007-03-22 14:03 UTC by Denis Jacquerye
Modified: 2008-04-05 16:58 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
normalizing and using g_utf8_strdown instead of g_ascii_strdown (1.39 KB, patch)
2007-03-22 17:38 UTC, Denis Jacquerye
committed Details | Review

Description Denis Jacquerye 2007-03-22 14:03:35 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.
Comment 1 Denis Jacquerye 2007-03-22 17:38:59 UTC
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).
Comment 2 Denis Jacquerye 2007-03-22 17:43:20 UTC
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.
Comment 3 Martin Wehner 2007-06-18 21:09:42 UTC
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>
Comment 4 Gilles Dartiguelongue 2008-04-05 16:58:52 UTC
fixing patch status.