In answering another question I became aware that my Javascript/DOM knowledge had become a bit out of date in that I am still using escape
/unescape
to encode the contents of URL components whereas it appears I should now be using encodeURIComponent
/decodeURIComponent
instead.
What I want to know is what is wrong with escape
/unescape
? There are some vague suggestions that there is some sort of problem around Unicode characters, but I can't find any definite explanation.
My web experience is fairly biased, almost all of it has been writing big Intranet apps tied to Internet Explorer. That has involved a lot of use of escape
/unescape
and the apps involved have fully supported Unicode for many years now.
So what are the Unicode problems that escape
/unescape
are supposed to have ? Does anyone have any test cases to demonstrate the problems ?