mirror of
https://github.com/GeyserMC/Geyser.git
synced 2024-08-14 23:57:35 +00:00
Force loading help-text using utf-8 to fix encoding errors (#4165)
This commit is contained in:
parent
5d30019bc7
commit
1d75d084a7
1 changed files with 2 additions and 1 deletions
|
@ -28,6 +28,7 @@ package org.geysermc.geyser;
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.lang.reflect.Method;
|
import java.lang.reflect.Method;
|
||||||
|
import java.nio.charset.StandardCharsets;
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
import java.util.Scanner;
|
import java.util.Scanner;
|
||||||
|
|
||||||
|
@ -60,7 +61,7 @@ public class GeyserMain {
|
||||||
helpStream = GeyserMain.class.getClassLoader().getResourceAsStream("languages/run-help/en_US.txt");
|
helpStream = GeyserMain.class.getClassLoader().getResourceAsStream("languages/run-help/en_US.txt");
|
||||||
}
|
}
|
||||||
|
|
||||||
Scanner help = new Scanner(helpStream).useDelimiter("\\Z");
|
Scanner help = new Scanner(helpStream, StandardCharsets.UTF_8).useDelimiter("\\Z");
|
||||||
String line = "";
|
String line = "";
|
||||||
while (help.hasNext()) {
|
while (help.hasNext()) {
|
||||||
line = help.next();
|
line = help.next();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue