中文乱码问题

来源:互联网 发布:2013网络歌曲排行榜 编辑:程序博客网 时间:2024/05/21 06:39

1.传递参数时候使用encodeURIComponent,否则url中很容易被”#”,”?”,”&”等敏感符号隔断。
2.url跳转时候使用,编码用encodeURI,解码用decodeURI。【js中】
3.escape() 只是为0-255以外 ASCII字符做转换工作,转换成的 %u**** 这样的码,如果要用更多的字符如UTF-8字符库 就一定要用 encodeURIComponent() 或 encodeURI() 转换才可以成 %nn%nn 这的码才可以,其它情况下escape,encodeURI,encodeURIComponent编码结果相同,所以为了全球的统一化进程,在用 encodeURIComponent() 或 encodeURI() 代替 escape() 使用吧!

后台:Server.UrlDecode(inStr)

0 0