From 62c7102f8069814e8df6a9b9a6f512b604b85752 Mon Sep 17 00:00:00 2001 From: EpicKnarvik97 Date: Thu, 2 Jun 2022 21:13:31 +0200 Subject: [PATCH] Makes sure to use UTF-8 for custom languages --- .../net/knarcraft/permissionsigns/formatting/Translator.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/net/knarcraft/permissionsigns/formatting/Translator.java b/src/main/java/net/knarcraft/permissionsigns/formatting/Translator.java index 1b09dbb..0ae9b37 100644 --- a/src/main/java/net/knarcraft/permissionsigns/formatting/Translator.java +++ b/src/main/java/net/knarcraft/permissionsigns/formatting/Translator.java @@ -9,6 +9,7 @@ import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.InputStreamReader; +import java.nio.charset.StandardCharsets; import java.util.HashMap; import java.util.Map; import java.util.logging.Level; @@ -88,7 +89,8 @@ public final class Translator { try { PermissionSigns.getInstance().getLogger().log(Level.WARNING, "Loading custom strings..."); - return loadTranslatableMessages(language, new BufferedReader(new InputStreamReader(new FileInputStream(strings)))); + return loadTranslatableMessages(language, new BufferedReader(new InputStreamReader( + new FileInputStream(strings), StandardCharsets.UTF_8))); } catch (FileNotFoundException e) { PermissionSigns.getInstance().getLogger().log(Level.WARNING, "Unable to load custom messages"); return null;