diff --git a/src/main/java/de/marhali/easyi18n/io/properties/PropertiesIOStrategy.java b/src/main/java/de/marhali/easyi18n/io/properties/PropertiesIOStrategy.java index a0063f8..0d3c9d4 100644 --- a/src/main/java/de/marhali/easyi18n/io/properties/PropertiesIOStrategy.java +++ b/src/main/java/de/marhali/easyi18n/io/properties/PropertiesIOStrategy.java @@ -70,7 +70,7 @@ public class PropertiesIOStrategy implements IOStrategy { data.addLocale(locale); 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); } diff --git a/src/main/java/de/marhali/easyi18n/io/yaml/YamlIOStrategy.java b/src/main/java/de/marhali/easyi18n/io/yaml/YamlIOStrategy.java index f5e7557..fbb0ced 100644 --- a/src/main/java/de/marhali/easyi18n/io/yaml/YamlIOStrategy.java +++ b/src/main/java/de/marhali/easyi18n/io/yaml/YamlIOStrategy.java @@ -76,7 +76,7 @@ public class YamlIOStrategy implements IOStrategy { String locale = file.getNameWithoutExtension(); data.addLocale(locale); - try(Reader reader = new InputStreamReader(file.getInputStream())) { + try(Reader reader = new InputStreamReader(file.getInputStream(), file.getCharset())) { Section section = Section.parseToMap(reader); YamlMapper.read(locale, section, data.getRootNode()); }