3
0
Mirror von https://github.com/GeyserMC/Geyser.git synchronisiert 2024-11-20 06:50:09 +01:00

Force loading help-text using utf-8 to fix encoding errors (#4165)

Dieser Commit ist enthalten in:
rtm516 2023-09-30 22:18:57 +01:00 committet von GitHub
Ursprung 5d30019bc7
Commit 1d75d084a7
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 4AEE18F83AFDEB23

Datei anzeigen

@ -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();