commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Денис Матвеев <madena...@gmail.com>
Subject unicode string in file
Date Tue, 31 Oct 2017 11:52:50 GMT
Hello, anybody can help?

I have such file properties

File file = new File("aaa.cfg");
Parameters params = new Parameters();
FileBasedConfigurationBuilder<PropertiesConfiguration> builder =
                 new 
FileBasedConfigurationBuilder<>(PropertiesConfiguration.class);
         builder.configure(params.properties()
                 .setFile(file)
                 .setEncoding("UTF-8")
                 .setListDelimiterHandler(new 
DefaultListDelimiterHandler(';')));
PropertiesConfiguration defProps = builder.getConfiguration();
props.setProperty("propname", "national encoding string");
builder.save();

How do I get Props not to save a string in file like this
propname = \u0442\u0435\u0441\u0442\u043E\u0432\u0430\

Comments saves well readable.

Thanks

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Mime
View raw message