Ignore diacritics (accent, cedilla...) in the search
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Exaile |
New
|
Wishlist
|
Unassigned |
Bug Description
In French or Spanish, there is lot's of word using diacritics (http://
Usually, if I look for "Beyoncé", I want to find her even if I wrote "Beyonce" in the search entry.
In UTF-8, we can easily convert a string with diacritics into a string without it.
Here you have a function example in C I wrote for one of my program using glib (sorry I don't know how to do that in Python) :
gchar*
g_utf8_
{
gchar *szNormalizedSt
GString* szStringBuilder;
gchar *szRes = NULL;
gunichar c;
gchar *szPtr = NULL;
if(str != NULL){
szNormalizedS
szStringBuilder = g_string_new ("");
szPtr = szNormalizedString;
while(szPtr){
c = g_utf8_
if(c != '\0'){
if (!g_unichar_
g_
}
szPtr = g_utf8_next_char (szPtr);
}else{
szPtr = NULL;
}
}
szRes = g_string_free (szStringBuilder, FALSE);
g_free(
}
return szRes;
}
Changed in exaile: | |
importance: | Undecided → Wishlist |
A little mistake, just replace g_string_append_c by g_string_ append_ unichar.