// initialization block to set the encoding before loading the file in the constructors
{
setEncoding(DEFAULT_ENCODING);
}
seems to set correctly the default encoding, but this block is called after "super()" in constructors.
So when using either PropertiesConfiguration(java.io.File file), PropertiesConfiguration(java.lang.String fileName) or PropertiesConfiguration(java.net.URL url), the super() statement is called, and it loads the file without the default encoding.
Description
The piece of code
PropertiesConfiguration.java
// initialization block to set the encoding before loading the file in the constructors
{
setEncoding(DEFAULT_ENCODING);
}
seems to set correctly the default encoding, but this block is called after "super()" in constructors.
So when using either PropertiesConfiguration(java.io.File file), PropertiesConfiguration(java.lang.String fileName) or PropertiesConfiguration(java.net.URL url), the super() statement is called, and it loads the file without the default encoding.
CONFIGURATION-345: Ensure that "ISO-8859-1" is used as default encoding, even by the constructors of the super class. Ported the fix to the configuration2 branch.