Accents in URL, how can I escape them correctly ?
10,178
use encodeURIComponent and decodeURIComponent. escape and unescape will be useful only for ASCII charset, while the former supports unicode charsets.
Author by
Sam
Updated on June 27, 2022Comments
-
Sam almost 2 years
I have to get what is next to the # character in the URL (in javascript). When there's an é, for example, I get escaped characters. I can unescape() them, but I get weird characters such as Ã. How can I get the right characters ?
-
mu is too short almost 13 yearsMozilla's MDN is much better JavaScript reference than w3schools.
-
Rodrigo almost 13 yearsLol'd! I use w3schools for references links while posting solutions here in SO.