How do I replace all UTF-8 letters like Ė È É Ê Ë Ą Č and so on to similar latin letters. For example the output of the string ĖÈÉÊËĄČ
would be EEEEEAC
using Javascript or Jquery?
technique described in this question
How do I convert special UTF-8 chars to their iso-8859-1 equivalent using javascript? returns the result as UTF-8 byte sequence so result of encodeURIComponent("å")
would be equal to %C3%A5
and in my case it should be a
The question may be a duplicate to this one Remove accents/diacritics in a string in JavaScript but all the solutions provided in that question is by hard coding all possible characters and to map that to the one you want to replace with and that's not very clean solution.