request乱码
2015-07-06 14:41
302 查看
-----------------方法1----------------------
//只有post提交才有效
//将request编码设置成与页面编码一样
request.setCharacterEncoding("UTF-8");
---------------方法2--------------------------
//通用
new String(获取到的数据.getBytes("ISO-8859-1"),"UTF-8");
---------------方法3---------------------
修改服务器配置
UriEncoding属性设置编码
//只有post提交才有效
//将request编码设置成与页面编码一样
request.setCharacterEncoding("UTF-8");
---------------方法2--------------------------
//通用
new String(获取到的数据.getBytes("ISO-8859-1"),"UTF-8");
---------------方法3---------------------
修改服务器配置
UriEncoding属性设置编码
相关文章推荐
- Angular+Angular-Ui实现分页(代码更加简单,更加容易懂哦)
- UITextField的一些常用方法
- How to make gdb print out all values in hexadecimal mode?
- GUI 文件遍历系统 (listdir.py)可显示中文目录文件版
- [leetcode] 128.Longest Consecutive Sequence
- requirejs学习博客址分享
- UIButton文字居左显示
- the resource is not on the build path of a java project错误
- android控制文件:ViewPager+Fragment+GridView使用(与AndroidQuery框架结合)
- iOS 去掉UITableView风格为group时候的最顶部的空白距离
- EasyUI Datagrid IE浏览器中滚动条不起作用
- [ACM] POJ 3061 Subsequence (仿真足)
- The goal you specified requires a project to execute but there is no POM in this directory
- quick3x_UIListView 做游戏背包
- SqlServer 批处理(Batch Requests/sec)过高追踪处理
- 使用UiAutomator中swipe(Point[], int)方法绘制解锁图案
- MIUI添加内存调试工具:查看进程中的Bitmap信息
- 通用 PE 工具箱1.9.6(XP内核)by Uepon(李培聪)
- 开始刷leetcode day59: Unique Paths
- UITableView的优化