/**
* 字符串转换函数unicode转化成iso8859-1
* @param str
* @return
*/
public static String getStr(String str) {
try {
if (str == null) {
str = "";
}
String tmpStr = str;
byte[] tmp_t = tmpStr.getBytes("ISO8859-1");
String tmp = new String(tmp_t);
return tmp;
}
catch (Exception e) {
e.printStackTrace();
}
return "";
}
* 字符串转换函数unicode转化成iso8859-1
* @param str
* @return
*/
public static String getStr(String str) {
try {
if (str == null) {
str = "";
}
String tmpStr = str;
byte[] tmp_t = tmpStr.getBytes("ISO8859-1");
String tmp = new String(tmp_t);
return tmp;
}
catch (Exception e) {
e.printStackTrace();
}
return "";
}
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货