Bootstrap

java 编码字符处理

String result = null;
byte temp[];
temp = str.getBytes(“iso-8859-1”);//以“iso-8859-1”的格式解码成二进制文件
result = new String(temp,“utf-8”); //以“utf-8”的格式将二进制文件编码成“utf-8”
两者功能和python里的str.deconding(),str.encoding()是一样的。