try{
String b = new String(a.getBytes("ISO-8859-1"));
} catch (UnsupportedEncodingException e) {
System.out.println("Error:" + e.getMessage());
}
String b = new String(a.getBytes("ISO-8859-1"));
} catch (UnsupportedEncodingException e) {
System.out.println("Error:" + e.getMessage());
}
try{
byte[] inputBytes = result.getBytes("8859_1");
result=new String(inputBytes,"UTF-8");
}
catch(Exception e){}
return result;
String b = new String(a.getBytes("ISO-8859-1"));
写成
String b = new String(a.getBytes("ISO-8859-1111"));
肯定行不通
就会转向异常处理
如果你写对了
就和你走路差不多了
其中string中有中文也有英文
就行了。