首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > 编程 >

处置从页面传过来的字符集

2012-12-20 
处理从页面传过来的字符集//1.获取页面中的属性值:String username request.getParameter(username)/

处理从页面传过来的字符集

//1.获取页面中的属性值:String username = request.getParameter("username");//2.修改字符集格式username = new String(username.getByte("ISO-8859-1"),"GB2312");


上面的getByte中的参数是页面中的字符集,String方法的第二个参数是目标字符集。

热点排行