GNOME Bugzilla – Bug 343505
Make Search ignore accents
Last modified: 2021-05-19 11:45:17 UTC
quick-search bar should ignore accenst on letters. So á à .... all should be considered equal to a. Motivation is that you often get contact information containing accents you can't enter without using the charactermap Other information:
which component do you refer to? mailer, contacts, calendar, all? anyway, this is an enhancement.
best is to have this consistent throughout the application
Reassigning to Srini and setting target to Future.
Banshee has C# code for this, see bug 458941. For me fixing this would still be the killer. Makes searching for messages so much easier in language with lots of accents. Hence CC'ing mcrha. ;-) On Mon, Feb 25, 2008 at 12:42 PM, Gabriel Burt <gabriel.burt@gmail.com> wrote: Search in stable was implemented as a C# loop iterating over all the TrackInfo objects in a Source (eg Library, Playlist, etc) and doing string comparisons - the code is here: http://svn.gnome.org/viewvc/banshee/branches/banshee/stable/src/Core/Banshee/PlayerInterface.cs?revision=3124&view=markup - see OnSimpleSearch and DoesTrackMatchSearch. What allows it to ignore accents etc is the use of CultureInfo.CurrentCulture.CompareInfo.Compare in src/Core/Banshee.Base/StringUtils.cs. However, in trunk search has been completely rewritten. It is parsed and turned into SQL using src/Libraries/Hyena/Hyena.Query. So, we don't have the advantages of the CultureInfo library. What we really need is a custom sqlite function for doing both case-insensitive matching (currently only works for ASCII chars) and for accent-less matching. Should probably google some more since it's quite likely others have solved this for sqlite already. If not, I would suggest either looking into making a C/C++ function for sqlite, or see if it can be done efficiently enough in C# - http://anonsvn.mono-project.com/viewcvs/trunk/mcs/class/Mono.Data.Sqlite/Mono.Data.Sqlite_2.0/ - SQLiteFunction.cs
I do not know. When I imagine an LDAP server query, to fetch all the contacts to manually check value there, instead of just passing some text to the server doing all the bad work for us. Same for calendar items and messages.
Created attachment 132821 [details] [review] proposed eds patch for evolution-data-server; In contacts only, for those supporting summary searches, in local cache mainly, as the first step, to show someone more interested in this area one possible way. Nonetheless, the "remove accents" function should be more tweaked, as it works fine for my language, but for some other might not. Note: it's safe to return pointer to already freed string in compare helper functions, as the result is only checked for NULL/not-NULL values, not for its content.
Looks fine to me.
Created commit 98a0731 in master. Letting bug opened in case someone is interested to include this also in any other area in evo/eds/...
*** Bug 605271 has been marked as a duplicate of this bug. ***
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org. As part of that, we are mass-closing older open tickets in bugzilla.gnome.org (resources are unfortunately quite limited so not every ticket can get handled). If you can still reproduce the situation described in this ticket in a recent and supported software version, then please follow https://wiki.gnome.org/Community/GettingInTouch/BugReportingGuidelines and create a new enhancement request ticket at https://gitlab.gnome.org/GNOME/evolution/-/issues/ Thank you for your understanding and your help.