use correct charset

This commit is contained in:
Marcel Haßlinger 2021-11-10 10:48:47 +01:00
parent 28d7592c20
commit 70747bf90a
2 changed files with 2 additions and 2 deletions

View File

@ -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);
} }

View File

@ -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());
} }