run-task icon indicating copy to clipboard operation
run-task copied to clipboard

fix: potential garbling

Open SNWCreations opened this issue 1 year ago • 4 comments

closes #60

SNWCreations avatar Jul 03 '24 03:07 SNWCreations

What exactly does this fix? Old Minecraft versions not properly specifying UTF-8 for the terminal? It seems like it could have other unintended side-effects, and would mean the development environment is different from a standard one. Unless there is some other context I'm missing.

jpenilla avatar Jul 06 '25 00:07 jpenilla

Specifying the UTF8 as console charset would avoid errored console output on operating systems which does not use UTF8 as its native file encoding (e.g. Windows builds for Simplified Chinese language, as it uses GBK) This fix applys to any version of Minecraft.

SNWCreations avatar Jul 06 '25 02:07 SNWCreations

Is setting this property commonplace in the Chinese community? Maybe we should adjust something in Paper to avoid needing it on newer versions? I am mainly concerned about inconsistency between dev and standard user environment, and the potential to hide bugs or oversights in plugins. Since this applies to more than just the console.

jpenilla avatar Jul 06 '25 03:07 jpenilla

Yes. This is common as far as I know, and I rarely see charset issues from plugins or server as modern plugins uses UTF8 by default in their code and modern editors like VSCode supports autodetect charset, unlike the old Windows notepad and old days (I remember that I was tired to deal with GBK and UTF8 file conversions). So it is safe to use file.encoding imo. However, it would be good to see a better solution to be used in Paper. To make sure this fix applys to older MC, you may need to do some version checking stuff.

---Original--- From: "Jason @.> Date: Sun, Jul 6, 2025 11:46 AM To: @.>; Cc: @.@.>; Subject: Re: [jpenilla/run-task] fix: potential garbling (PR #61)

jpenilla left a comment (jpenilla/run-task#61)

Is setting this property commonplace in the Chinese community? Maybe we should adjust something in Paper to avoid needing it on newer versions? I am mainly concerned about inconsistency between dev and standard user environment, and the potential to hide bugs or oversights in plugins. Since this applies to more than just the console.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

SNWCreations avatar Jul 06 '25 04:07 SNWCreations