I'm using this excellent solution given here https://stackoverflow.com/a/9127872/3612903 to search and filter a table, but as soon as I'm typing utf 8 chars the results disappear.
Iv'e tried to add the u
(for Unicode) into .split(/\s+/)
and replace(/\s+/g, ' ')
, but had no success.
What would be the correct syntax for these commands so they will include utf-8 chars?
Thanks.
Asked
Active
Viewed 83 times
1
-
1so one unicode char is in a form value and one is in visible html? the visible html probably escapes the char into an html entity or xml entity. you can turn one into the other before searching. it would be faster to encode the search term so that you need not touch each compared value. you can do that by setting a temp element's innerHTML with the value and then reading the same element's text, and comparing the result text to the row text. – dandavis Dec 07 '14 at 00:56
-
Do you mean something like `var $search = document.getElementById("search").innerHTML` ? Sorry if I didn't understand completely. Could you suggest an example based on the solution [here](http://stackoverflow.com/a/9127872/3612903)? – Shaya Dec 07 '14 at 01:15
-
can you offer an example of the input and a small chunk of the html that should be matched? – dandavis Dec 07 '14 at 01:39
-
Sure. Example to the input : דניאל Example of the html that should be matched :
דניאל – Shaya Dec 09 '14 at 11:50