Моя строка;
var str = "Mehmet%2bAli%2b%c3%96zcan";
И я хочу получить строку;
var strDecoded = "Mehmet Ali Özcan";
Я пробовал все следующие;
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;
}
Что я могу сделать еще, чтобы получить правильную строку? любая идея?
%20
, а не+
или даже%2b
- person Esailija   schedule 02.08.2013