首页 > 其他 > 详细

request.setCharacterEncoding("utf-8");

时间:2014-10-28 19:59:50      阅读:230      评论:0      收藏:0      [点我收藏+]

request.setCharacterEncoding("utf-8");
不加这句话时,从input控件得到值要用new String(request.getParameter("").getBytes("ISO-8859-1"),"utf-8")方法,
而从 a href=""中得到值直接用request.getParameter("")方法;
而加入了这句话后,从input控件得到值直接用request.getParameter("")方法,而从 a href=""中得到值也要用request.getParameter("")方法

request.setCharacterEncoding("utf-8");

原文:http://www.cnblogs.com/strive-for-freedom/p/4057618.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!