From 70747bf90ae551863c4129884b96784438b30206 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcel=20Ha=C3=9Flinger?= Date: Wed, 10 Nov 2021 10:48:47 +0100 Subject: [PATCH] use correct charset --- .../de/marhali/easyi18n/io/properties/PropertiesIOStrategy.java | 2 +- src/main/java/de/marhali/easyi18n/io/yaml/YamlIOStrategy.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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()); }