jquery-pluginsspecial-charactersdiacriticsquick-search

jquery quicksearch - special characters


I'm using the Jquery quicksearch plugin.

It's a great plugin, but I have an issue on one of my website.

In a table, I have strings that contains characters with accents, like ò, ü, ä, etc. The problem is that users will not necessary search with the accents.

What I would like to achieve is that when someone types in "ola" for example, the search results would also display results containing "ölä"

Any idea on how to do it?


Solution

  • You need to store your values in table in 2 columns: 1) raw 2) clean. 1) Raw - words as thay are like ò, ü, ä, etc. 2) Clean - without accents like o,u,a.

    To make "clean" you need a transition function, while updating or inserting into table, it won't be so hard to do it.

    So while the users are typing in terms for search, you can look through both columns, "clean" and "raw".