public static void main(String[] arg) throws UnsupportedEncodingException{
ResourceBundle rb = ResourceBundle.getBundle("questionTemplate",Locale.SIMPLIFIED_CHINESE);
Enumeration<String> enum1 = rb.getKeys();
while (enum1.hasMoreElements()) {
String keyName = enum1.nextElement();
String keyValue = new String(rb.getString(keyName).getBytes("ISO-8859-1"), "UTF-8");
System.out.println(keyName + ":" + keyValue);
}
}
资源文件中文不乱码
最新推荐文章于 2021-07-27 11:51:02 发布