Quantcast
Channel: Search with diacritics / accents characters with `locate` command - Ask Ubuntu
Viewing all articles
Browse latest Browse all 3

Search with diacritics / accents characters with `locate` command

$
0
0

Sometimes I need to search files with accented characters (diacritic in general), usually with locate (mlocate flavor, Merging Locate; see below the warning related to plocate). I wish to setup (maybe in /etc/updatedb.conf) so it let me search for this special characters using a certain language mapping, for example:

a == âàáäÂÀÂÄe == êèéëÊÈÉËi == îïíÎÏo == ôöóÔÖu == ûùüÛÜÙc == çÇn == ñ

So locate -i liberación also should search for file names with string liberacion and even liberaciòn.

Notes and assumptions

  • And maybe others: ÂÃÄÀÁÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ.
  • This is a common situation on romance languages like Spanish, French, and German.
  • I'm always using a locale 100% UTF-8.
  • I would rather not have to use regular expressions.
  • A patch might use ASCII transliterations of Unicode as Unidecode/cUnidecode does. Most of mlocate is written on C.

Related


Viewing all articles
Browse latest Browse all 3

Latest Images

Trending Articles





Latest Images