java-properties icon indicating copy to clipboard operation
java-properties copied to clipboard

is utf-8 default?

Open Silentdoer opened this issue 4 years ago • 1 comments

in java, xx.properties is ISO-8859-1, i think this crate should support default utf8?

Silentdoer avatar Dec 26 '20 12:12 Silentdoer

This crate uses ISO-8859-1 by default because that's what the Java Properties class uses. If this used UTF-8 by default, it wouldn't be compatible with the Java Properties class. Custom encodings (including UTF-8) can be used by passing the encoding to PropertiesIter::new_with_encoding or PropertiesWriter::new_with_encoding.

adamcrume avatar Dec 27 '20 22:12 adamcrume