My string is;
var str = "Mehmet%2bAli%2b%c3%96zcan";
And I want to get string;
var strDecoded = "Mehmet Ali Özcan";
I tried all of followings;
strDecoded = decodeURIComponent(str); // Fails;
strDecoded = decodeURIComponent((str + '').replace(/\+/g, '%20')); // Fails
strDecoded = _decodeURI(str); // Fails
function _decodeURI(str) {
str = decodeURI(str);
str = str.replace(/%27/g, "'");
return str;
}
What can I do else to get correct string? any idea?