1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2024-12-25 01:20:31 +00:00

Specify charset when printing error messages

This commit is contained in:
Jonathan Coates 2023-12-08 09:49:57 +00:00
parent af12b3a0ea
commit 1f7d245876
No known key found for this signature in database
GPG Key ID: B9E431FF07C98D06

View File

@ -23,6 +23,7 @@ import org.slf4j.LoggerFactory;
import java.io.IOException;
import java.io.PrintWriter;
import java.nio.ByteBuffer;
import java.nio.charset.StandardCharsets;
import java.nio.file.InvalidPathException;
import java.nio.file.Path;
import java.util.Objects;
@ -97,7 +98,7 @@ public class Main {
} catch (ParseException e) {
System.err.println(e.getLocalizedMessage());
var writer = new PrintWriter(System.err);
var writer = new PrintWriter(System.err, false, StandardCharsets.UTF_8);
new HelpFormatter().printUsage(writer, HelpFormatter.DEFAULT_WIDTH, "standalone.jar", options);
writer.flush();