先将从配置文件获取的中文字符串转为ISO_8859_1编码的字节数组,再转为UTF-8编码的字符串
String new_str = new String(old_str.getBytes(StandardCharsets.ISO_8859_1), StandardCharsets.UTF_8);
先将从配置文件获取的中文字符串转为ISO_8859_1编码的字节数组,再转为UTF-8编码的字符串
String new_str = new String(old_str.getBytes(StandardCharsets.ISO_8859_1), StandardCharsets.UTF_8);