Closed cristi-badila closed 8 years ago
decodeURIComponent
is already there, but both need to be used, see: http://ecmanaut.blogspot.pt/2006/07/encoding-decoding-utf8-in-javascript.html
Browser's can't simply remove methods from their engine otherwise they would break a lot of sites, see this comment: http://ecmanaut.blogspot.pt/2006/07/encoding-decoding-utf8-in-javascript.html#comment-785303118
If they ever remove it, I will either polyfill the method or do it in plain JavaScript.
I noticed that in the
toUtf8
function you are using theunescape
method which was deprecated. Wouldn't usingdecodeURIComponent
achieve the same goal?