日期:2014-05-17  浏览次数:21079 次

request传递中文参数乱码,如何改进?
request传递中文参数乱码,如何改进?

A.asp?type=中国

type=request( "type ")

获取的值是乱码,如何改进?

------解决方案--------------------
在前一页编码

a = "中国 "
response.redirect "A.asp?type= " & escape(a)
------解决方案--------------------
"A.asp?type= " & URLEncode( "中国 ") '中文最好使用URL编码

type=request( "type ")
------解决方案--------------------
更改文件编码为utf-8 ?


------解决方案--------------------
顶一个 CarlosYoung(云飞扬)
------解决方案--------------------
"A.asp?type= " & Server.URLEncode( "中国 ")
------解决方案--------------------
偶当时为了js和asp都方便,用了escape~```