mirror of
https://github.com/darksaid98/Carbon.git
synced 2026-12-04 14:38:49 +00:00
Use UTF-8 when reading from translations in jar (closes #180)
This commit is contained in:
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;
|
||||||
|
|||||||
Reference in new issue
Block a user