mirror of
https://github.com/Flowsqy/ShopChest.git
synced 2025-01-08 07:57:41 +01:00
Force the UTF-8 encoding for lang configurations
This commit is contained in:
parent
e07acb4099
commit
36b09ffe9e
@ -4,6 +4,7 @@ import org.jetbrains.annotations.NotNull;
|
|||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
import java.nio.charset.StandardCharsets;
|
||||||
import java.nio.file.Files;
|
import java.nio.file.Files;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
@ -18,7 +19,7 @@ public class LanguageConfigurationLoader {
|
|||||||
public Map<String, String> getTranslations(@NotNull File file, @NotNull Logger logger) {
|
public Map<String, String> getTranslations(@NotNull File file, @NotNull Logger logger) {
|
||||||
final List<String> lines;
|
final List<String> lines;
|
||||||
try {
|
try {
|
||||||
lines = Files.readAllLines(file.toPath());
|
lines = Files.readAllLines(file.toPath(), StandardCharsets.UTF_8);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
logger.log(Level.WARNING, "Can not read the message registry", e);
|
logger.log(Level.WARNING, "Can not read the message registry", e);
|
||||||
return Collections.emptyMap();
|
return Collections.emptyMap();
|
||||||
|
Loading…
Reference in New Issue
Block a user