乱码问题,最基本的解决方法
String encodeBefore = "乱码问题";
try {
String encodeAfter = new String(encodeBefore.getBytes("ISO-8859-1"),"UTF-8");
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
发布时间: 2012-09-10 22:20:12 作者: rapoo
乱码问题,最基本的解决方法
String encodeBefore = "乱码问题";
try {
String encodeAfter = new String(encodeBefore.getBytes("ISO-8859-1"),"UTF-8");
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}