When i'm trying to put russian text in cookie via javascript and then output it via php it returns:
%u043F%u0440%u043E%u0432%u0435%u0440%u043A%u0430
How to decode this to normal cyrillic characters?
This is the function i'm using to pass to document.cookie:
function setCookie(c_name,val,c_expiredays,c_path,c_domain,c_secure)
{
var exdate=new Date();
exdate.setDate(exdate.getDate()+c_expiredays);
document.cookie=c_name+ "=" +escape(val)+
/* Additional settings */
((c_path) ? "; path=" + c_path : "") + ((c_domain) ? "; domain=" + c_domain : "") + // used to allow using only on a certain domain ((c_secure) ? "; secure" : "") + // used for HTTPS (SSL)
((c_expiredays==null) ? "" : ";expires="+exdate.toGMTString());
}
setCookie('name',$(this).val(),1);
On server side, i'm outputting like that:
(isset($_COOKIE['img_href_value']) ? $_COOKIE['img_href_value'] : '')