public String translate (String str) { String tempStr = ""; try { tempStr = new String(str.getBytes("ISO-8859-1"), "GBK"); tempStr = tempStr.trim(); }catch (Exception e) { System.err.println(e.getMessage()); } return tempStr; }
public String translate (String str) { String tempStr = ""; try { tempStr = new String(str.getBytes("ISO-8859-1"), "GBK"); tempStr = tempStr.trim(); }catch (Exception e) { System.err.println(e.getMessage()); } return tempStr; }
转载于:https://www.cnblogs.com/zhaideyou/p/5929977.html