取出Cookie中的中文显示乱码解决方法
HttpUtility.UrlEncode(Response.Cookies[ "newcookie "].Values);
HttpUtility.UrlDecode(Request.Cookies[ "newcookie "].Values);
HttpUtility.UrlDecode(Request.Cookies[ "newcookie "].Values);
方法二:
web.config文件里面的编码试改下:
<globalization requestEncoding= "utf-8 " responseEncoding= "utf-8 "/>
改成下面这一行
<globalization requestEncoding= "gb2312 " responseEncoding= "gb2312 " />
<globalization requestEncoding= "gb2312 " responseEncoding= "gb2312 " />
方法三:
Server.UrlEncode(Response.Cookies[ "newcookie "].Values);
Server.UrlDecode(Request.Cookies[ "newcookie "].Values);
Server.UrlDecode(Request.Cookies[ "newcookie "].Values);
经本人验证,第三种方法,有效