cookie中文亂碼解決

因爲以前出現錯誤:java.lang.IllegalArgumentException: Control character in cookie value or attribute.java 是編碼問題形成的。cookie 故先在寫入cookie時進行編碼:URLEncoder.encode(name, "utf-8"); 再在從cookie中讀出時解碼:URLDecoder.decode(co
相關文章
相關標籤/搜索