当前位置:编程学习 > 网站相关 >>

UTF-8和GB2312编码转换,常用

[html]
JavaScript:  
window.self.location="searchbytext.action?searchtext="+encodeURIComponent(encodeURIComponent(seartext));  
java:  
searchtext=java.net.URLDecoder.decode(searchtext,"UTF-8");/*需要处理异常*/  



摘自 Hurry的专栏
补充:Web开发 , 其他 ,
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,