In a React app, I need to send to a backend a search term with Unicode Decimal characters.
If the user enters ä
, I need to convert it to ä
If the user enters KivisiltaöøäÅåÄ
I need to convert it to KivisiltaöøäÅåÄ
How to do it automatically for all most common latin letters and Latin-1 supplement?
I found this very useful article to parse it: Replace unicode characters with characters (Javascript) But I need the contrary, to encode it.