I am using PHP to write the cookie:
setcookie("mycookie","variable1|variable2|variable3");
All is fine, when I use PHP to read the cookie. However, I also want to use javascript to call and read the cookie. When I do, this is what is translated:
"variable1%7Cvariable2%7Cvarialbe3%7C"
Clearly special characters are not showing as I expected. But PHP is translating it just fine.
Do I need to do something extra in javascript to read the cookie? How are special characters written and read with js?