我的application文件已经用native2ascii命令转码过了,为什么运行结果还是乱码啊小弟的测试类如下
import java.util.*;
public class ResourceManage {
private static Locale locale=Locale.CHINESE;
private static ResourceBundle bundle= ResourceBundle.getBundle("application",locale);
public static String getValue(String key)
{
return bundle.getString(key);
}
public static void main(String args[])
{
System.out.println(getValue("username"));
}
}
import java.util.*;
public class ResourceManage {
private static Locale locale=Locale.CHINESE;
private static ResourceBundle bundle= ResourceBundle.getBundle("application",locale);
public static String getValue(String key)
{
return bundle.getString(key);
}
public static void main(String args[])
{
System.out.println(getValue("username"));
}
}
native2ascii -encoding gb2312 原ISO.properties 部标GB2312.properties