0

how can I use a query (in Parse) in javascript to find or match words with accented characters like "escazú" and "escazu", both words must display the same results.

I have something like

query.matches("direccion", "escazú", i);

Thanks for your help! Leo

Leo
  • 1
  • Why not just remove accented characters and replace them with non accented one? Infact do this for every diacritic. Take a look at http://stackoverflow.com/questions/990904/remove-accents-diacritics-in-a-string-in-javascript – Quirk Mar 29 '16 at 18:22
  • Ok, but what about if in database the values are stored with accented characters? – Leo Mar 29 '16 at 18:37
  • Well then it's a design call. You can either remove all support for diacritics. This would mean **sanitizing** before insertion into your db. That is a bad thing, if you are looking for extended audiences. You could store additional attributes which have copies of query strings with removed/replaced diacritics. You could also just preprocess your query string, every time you run your query. – Quirk Mar 29 '16 at 18:41
  • Thanks for your help!! – Leo Mar 29 '16 at 18:45

0 Answers0