How can I store international / Unicode characters into a cookie?
Author: Callum Bir (http://www.jguru.com/guru/viewbio.jsp?EID=1084713), Jun 16, 2003I have the same problem, and the above solution does not work. When a Javascript writes a cookie which contains say Chinese characters, when we retrieve it, it looks fine. When JSP sends the cookie, (gets the value from the parameter), the cookie appears as rubbish. The JSP page is setting the encoding to utf-8, which is the same as the input HTML form. The key problem now is really setting and retrieving say Chinese characters (or anything non english) from Java Cookie in JSP/Servlet. As long as the data is not coming through the cookie, I can get the data correctly coming through the JSP and displayed correctly in any Java Swing component. But as soon as the data comes in through the cookie, things stops working. Anything I am missing?