Use UTF-8 when reading from translations in jar (closes #180)

This commit is contained in:
Jason Penilla committed 2021-12-19 19:22:21 -08:00
1 parent ae60bf39ba
commit e5399ade6b
1 file changed
+2 -2
@@ -219,9 +219,9 @@ public final class CarbonMessageSource implements IMessageSource<Audience, Strin
boolean write = !Files.isRegularFile(savedFile); boolean write = !Files.isRegularFile(savedFile);
// Read the file in the jar and add missing entries // Read the file in the jar and add missing entries
try (final InputStream stream = Files.newInputStream(localeFile)) { try (final Reader reader = new InputStreamReader(Files.newInputStream(localeFile), StandardCharsets.UTF_8)) {
final Properties packaged = new Properties(); final Properties packaged = new Properties();
packaged.load(stream); packaged.load(reader);
for (final Map.Entry<Object, Object> entry : packaged.entrySet()) { for (final Map.Entry<Object, Object> entry : packaged.entrySet()) {
write |= properties.putIfAbsent(entry.getKey(), entry.getValue()) == null; write |= properties.putIfAbsent(entry.getKey(), entry.getValue()) == null;