#40 Search with diacritics / accents characters
Opened 6 years ago by pabloab. Modified 6 years ago

Following what I wrote on this Askubuntu question (please see that link) would be great to have the alternative to search considering non-ASCII chars like ASCII ones, a == âàáäÂÀÂÄ, so if I search for "Trmač" brings me "trmac" too.
I think this is a great feature and very easy (for already mlocate developers) to implement, maybe using cUnidecode.


This can be fixed with https://pagure.io/mlocate/pull-request/41

There are also other ways to do this, but indeed way faster than using regex as suggested in that question.

Excellent! I'll update the askubuntu post. When do you expect we would have
this available with just a apt update? I hope not being too greedy :)

Well, for Ubuntu we'd like to have this quite soon, so... Maybe not too late.

But indeed we need some further testing.

Would be neater a flag like TRANSLITERATE="yes" on /etc/updatedb.conf to
avoid the need of an alias to always include the option.

The fact is that option isn't related to the db-updater, but only to the locate command, so we can't put it there. updatedb will continue working as it always did, we just compare transliterated strings now, so the fact they're accented or not, won't make much difference.

I've also pushed some more changes that improve speed and accuracy a lot here.

Great news @marcotrevisan ! Could be backported to currently supported releases? At least LTS ones Thanks! :)

@pabloab: unfortunately not to current LTS (16.04), but it's already (and will) be there in 18.04.

Login to comment on this ticket.

Metadata