use correct charset
This commit is contained in:
parent
28d7592c20
commit
70747bf90a
@ -70,7 +70,7 @@ public class PropertiesIOStrategy implements IOStrategy {
|
|||||||
data.addLocale(locale);
|
data.addLocale(locale);
|
||||||
|
|
||||||
SortableProperties properties = new SortableProperties(state.isSortKeys());
|
SortableProperties properties = new SortableProperties(state.isSortKeys());
|
||||||
properties.load(new InputStreamReader(file.getInputStream()));
|
properties.load(new InputStreamReader(file.getInputStream(), file.getCharset()));
|
||||||
PropertiesMapper.read(locale, properties, data);
|
PropertiesMapper.read(locale, properties, data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -76,7 +76,7 @@ public class YamlIOStrategy implements IOStrategy {
|
|||||||
String locale = file.getNameWithoutExtension();
|
String locale = file.getNameWithoutExtension();
|
||||||
data.addLocale(locale);
|
data.addLocale(locale);
|
||||||
|
|
||||||
try(Reader reader = new InputStreamReader(file.getInputStream())) {
|
try(Reader reader = new InputStreamReader(file.getInputStream(), file.getCharset())) {
|
||||||
Section section = Section.parseToMap(reader);
|
Section section = Section.parseToMap(reader);
|
||||||
YamlMapper.read(locale, section, data.getRootNode());
|
YamlMapper.read(locale, section, data.getRootNode());
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user