How to modify filter string prior to filtering?

How to modify filter string prior to filtering?

kowalskikowalski Posts: 1Questions: 0Answers: 0
edited June 2011 in General
Hello DataTables users & developers,

I'm using DataTables to filter a table with many international strings, like "Hrökkbrauð", in it.

If you have a keyboard layout which has no "ö" key, it might be hard to use the search box to find this entry.

So I thought it would be nice, if we had a mapping of plain ASCII to special characters and could then type pure ASCII string and everything with corresponding ASCII and special characters gets found.

E.g.
o => o,ö,ø,ō,...

Then you type "hrok", which gets translated to "hr[o|ö|ø|ō]k" and matches "Hrökkbrauð"".

This essentially means I have to modify the user supplied filter string into a regexp and then use this regexp to filter the table.

Do you have any propositions how to do this most elegantly?

Kind regards.

Replies

  • volponivolponi Posts: 1Questions: 0Answers: 0
    Does anyone have some idea how to address this issue? This would be specially helpful with a lot of languages, as Portuguese, Spanish, Dannish, French...
This discussion has been closed.