使用如下方法转换:
//显示中文,从sybase读出后转换
public static String switchChinese(String str){
try{
String temp;
byte[] temp_byte = str.getBytes("ISO8859-1");
temp = new String(temp_byte, "gb2312");
return temp;
} catch (Exception e){
return null;
}
// return str;
}
//显示中文,从sybase读出后转换
public static String switchChinese(String str){
try{
String temp;
byte[] temp_byte = str.getBytes("ISO8859-1");
temp = new String(temp_byte, "gb2312");
return temp;
} catch (Exception e){
return null;
}
// return str;
}
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货