I entered the following in Chrome\'s console:
decodeURIComponent(\'a%AFc\');
Instead of resulting to a0xAFc, it caused a URIError
a0xAFc
%AF is not a character on his own but part of Unicode sequence (MACRON - %C2%AF).
%AF
%AF wasn't produced by encodeURIComponent but something like escape, so it can be decoded by unescape.
encodeURIComponent
escape
unescape
What you probably need is decodeURIComponent('%C2%AF')
decodeURIComponent('%C2%AF')