用这个函数处理一下吧。
public String getGB(String str) {
if (str==null) return null;
try {
byte[] bytes = str.getBytes( "ISO8859-1" );
String sRet = new String(bytes, "GBK");
return sRet;
}catch(Exception e) {
return str;
}
}
public String getGB(String str) {
if (str==null) return null;
try {
byte[] bytes = str.getBytes( "ISO8859-1" );
String sRet = new String(bytes, "GBK");
return sRet;
}catch(Exception e) {
return str;
}
}
解决方案 »
- 求一个PC server的流行硬件配置详单!
- poi 导入excel时,如何取excel公式里的值
- 请教 JSP 分页效率
- Select在本页面无刷新传值问题
- 请各位高手介绍一下论坛数据保存的方案
- 关于uploadBean上传文件出现文件名乱码的问题,window正常,linux就出问题了 好急~~~~~~~~~~~~~~~~~~~~~~~~~~~
- 设计中遇到的问题
- 提示出下面的错误是什么意思?
- 问个菜鸟问题,JSP的
- 谁想要分?敬献100分
- 在JSP+ServletT+JavaBean开发模式中的Servlet一般是用来做什么用的?
- tomcat5.0 DBCP连接池的问题:java.sql.SQLException: Cannot load JDBC driver class 'null'
是什么原因?