+ -
当前位置:首页 → 问答吧 → asp网页读取Cookies值时中文乱码,英文数字则正常,请问怎么办?

asp网页读取Cookies值时中文乱码,英文数字则正常,请问怎么办?

时间:2011-09-25

来源:互联网

在index.asp首页(vbscript语言),这个首页是gb2312编码,写入:
Response.Cookies("biantiName")=Request.Form("username")

在另一个网页bianlun.asp读取,这个页是用utf-8编码的,读取:

 Response.Write "<br />昵称:<input name="""&encodestr(Request.Cookies("antry"))&""" id=""pname"" type=""text"" class=""log"" size=""50"" value="""&Request.Cookies("biantiName")&""" maxlength=""40"" /> "

现在的症状是:如果username是英文数字则读取没有问题,可是有的username注册时用的是中文,这是bianlun.asp显示的就是乱码,怎么办呀?请教高手回答。
网上找了很多,可是都不是解决asp的,而是什么asp.net或js的,请回答,谢谢帮忙!
请写的细致点儿,太简单我不会往里面加的,谢谢!

作者: qiancenglang666   发布时间: 2011-09-25

在另一个网页bianlun.asp读取,这个页是用utf-8编码的,读取:

这个页面编码换成GB2312

作者: enjoy_gw   发布时间: 2011-09-26

页面编码要统一

作者: beyond_me21   发布时间: 2011-09-26