File file = new File("/dav.authz");
Ini ini = new Ini(file);
Config config = ini.getConfig();
config.setEscape(false);
ini.add("test:/中文", "test", "rw");
ini.store(file);
使用java中的ini4j 写配置文件,会出现中文变成unicode的情况,解决办法:
获取config对象,将Config
属性设置为false的escape
将禁止转义非ASCII字符