Makes sure to use UTF-8 for custom languages
This commit is contained in:
parent
281deabe3d
commit
62c7102f80
@ -9,6 +9,7 @@ import java.io.File;
|
|||||||
import java.io.FileInputStream;
|
import java.io.FileInputStream;
|
||||||
import java.io.FileNotFoundException;
|
import java.io.FileNotFoundException;
|
||||||
import java.io.InputStreamReader;
|
import java.io.InputStreamReader;
|
||||||
|
import java.nio.charset.StandardCharsets;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
@ -88,7 +89,8 @@ public final class Translator {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
PermissionSigns.getInstance().getLogger().log(Level.WARNING, "Loading custom strings...");
|
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) {
|
} catch (FileNotFoundException e) {
|
||||||
PermissionSigns.getInstance().getLogger().log(Level.WARNING, "Unable to load custom messages");
|
PermissionSigns.getInstance().getLogger().log(Level.WARNING, "Unable to load custom messages");
|
||||||
return null;
|
return null;
|
||||||
|
Loading…
Reference in New Issue
Block a user