当前位置: 代码迷 >> ASP >> request传递中文参数乱码,怎么改进
  详细解决方案

request传递中文参数乱码,怎么改进

热度:382   发布时间:2012-02-28 13:06:35.0
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~```
  相关解决方案