mojira.dev
MC-302346

Codes of conduct not encoded in UTF-8 that include non-ASCII characters prevent the server from starting

Codes of conduct including non-English characters such as ü or ß do not work and prevent the server from starting. Since all languages are supported as separate files, it makes no sense that letters from other languages are not supported. The following error is shown in the console:

[21:12:38] [ServerMain/ERROR]: Failed to start the minecraft server
java.lang.IllegalArgumentException: Failed to read Code of Conduct file de_de.txt
        at aro.bU(SourceFile:135) ~[server-1.21.9-rc1.jar:?]
        at aro.<init>(SourceFile:110) ~[server-1.21.9-rc1.jar:?]
        at net.minecraft.server.Main.a(SourceFile:221) ~[server-1.21.9-rc1.jar:?]
        at net.minecraft.server.MinecraftServer.a(SourceFile:304) ~[server-1.21.9-rc1.jar:?]
        at net.minecraft.server.Main.main(SourceFile:220) ~[server-1.21.9-rc1.jar:?]
        at net.minecraft.bundler.Main.lambda$run$0(Main.java:54) ~[?:?]
        at java.base/java.lang.Thread.run(Thread.java:1583) [?:?]
Caused by: java.nio.charset.MalformedInputException: Input length = 1
        at java.base/java.nio.charset.CoderResult.throwException(CoderResult.java:279) ~[?:?]
        at java.base/sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:405) ~[?:?]
        at java.base/sun.nio.cs.StreamDecoder.lockedRead(StreamDecoder.java:217) ~[?:?]
        at java.base/sun.nio.cs.StreamDecoder.read(StreamDecoder.java:171) ~[?:?]
        at java.base/java.io.InputStreamReader.read(InputStreamReader.java:188) ~[?:?]
        at java.base/java.io.BufferedReader.fill(BufferedReader.java:160) ~[?:?]
        at java.base/java.io.BufferedReader.implReadLine(BufferedReader.java:370) ~[?:?]
        at java.base/java.io.BufferedReader.readLine(BufferedReader.java:347) ~[?:?]
        at java.base/java.io.BufferedReader.readLine(BufferedReader.java:436) ~[?:?]
        at java.base/java.nio.file.Files.readAllLines(Files.java:3395) ~[?:?]
        at aro.bU(SourceFile:132) ~[server-1.21.9-rc1.jar:?]
        ... 6 more

Attachments

Comments 5

I can’t reproduce this. Are you sure that any non-English character will cause the problem?

ss.png

I just tried again, with a de_de.txt file that only contains This is a test of the CoC with special character ß, and it still doesn’t work.

grafik-20250928-082124.png

As soon as I remove the ß at the end, the server starts.

Thank you for your report!
After consideration, the issue is being closed as Invalid.

This report does not describe a bug.

Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support (Technical Issues) – 📧 Microsoft Support (Account Issues)
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki

You seem to be writing those files in your local encoding/codepage (Windows-1252? ISO/IEC 8859-1?).

This not supported, game always expects all text files to be encoded in UTF-8.

Phoenix3000

(Unassigned)

Confirmed

(Unassigned)

1.21.9 Release Candidate 1

Retrieved