解决中文乱码问题的方法(三法)
阅读:2002 输入:2014-05-06 09:10:51
1. 重新定义。 String str = "中文试试" ; str = new String(u.getBytes("iso-8859-1"),"utf-8");
2. 使用过滤器解决。
3. 修改Tomcat配置server.xml。
1. 重新定义。 String str = "中文试试" ; str = new String(u.getBytes("iso-8859-1"),"utf-8");
2. 使用过滤器解决。
3. 修改Tomcat配置server.xml。