高手求救:mysql中文乱码问题! 连接编码设定或iso-8859-1 -> gb2312 or gbk 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 我再文件头已经加了<%@ page contentType="text/html; charset=gb2312" %>现在具体怎么个转的方法? 存储的时候应该转换一下吧public String getstr(str){ String temp_p = str; byte[] temp_t = temp_p.bytes("ISO8859-1"); String temp = new String (temp_t); return temp;}catch(Exception e){} 存储的时候应该转换一下吧public String getstr(str){ try{ String temp_p = str; byte[] temp_t = temp_p.bytes("ISO8859-1"); String temp = new String (temp_t); return temp; }catch(Exception e) { System.out.println(e.toString()); }return "null";} jforum2.1.9部署到eclipse出错! 寻求免费邮件服务器 关于jstl 在线急等,求一段jsp+javabean的分页代码 如何配置xpdf的中文补丁? struts 的findForward问题,请帮忙看看..\感激不进 万恶的课程表 jsp中有类似asp中Server.HTMLEncode()的东西吗?函数,方法,类? 类型转换的问题Integer.parseInt 我的SERVLET编译不能通过,请帮忙? 今天看了一段代码,但运行是出现一个错误? 求一段代码!!!在servlet中用POI将查询得到的数据结果集生成excel文件输出到客户端。
现在具体怎么个转的方法?
{
String temp_p = str;
byte[] temp_t = temp_p.bytes("ISO8859-1");
String temp = new String (temp_t);
return temp;
}catch(Exception e)
{}
{
try{
String temp_p = str;
byte[] temp_t = temp_p.bytes("ISO8859-1");
String temp = new String (temp_t);
return temp;
}catch(Exception e)
{
System.out.println(e.toString());
}
return "null";
}