neoforged / ModDevGradle

A Gradle plugin for developing Minecraft mods using NeoForge
https://projects.neoforged.net/neoforged/moddevgradle
GNU Lesser General Public License v2.1
33 stars 4 forks source link

Fix issues with non-ASCII characters in paths when the system property file.encoding was overriden #80

Closed shartte closed 3 months ago

shartte commented 3 months ago

Charset.defaultCharset() sadly cannot be used to write files that are always read using the Platforms native encoding, since a user can override it. Use the new native.encoding property instead, which cannot be overridden and contains the actual system encoding used for program arguments, etc.

Also update DevLaunch to always use UTF-8 to make it 1) reliable and 2) bring it in line with FML JUnit which parses the same argument file using UTF-8 already.

neoforged-pr-publishing[bot] commented 3 months ago

Last commit published: d6cc8b0c1ef73a7f10c2e92614fc043f3bbcc2d7.

PR Publishing ### The artifacts published by this PR: - :package: [`net.neoforged:moddev-gradle:0.1.124-pr-80-real-charset-fix`](https://github.com/neoforged/ModDevGradle/packages/2195526) - :package: [`net.neoforged.moddev:net.neoforged.moddev.gradle.plugin:0.1.124-pr-80-real-charset-fix`](https://github.com/neoforged/ModDevGradle/packages/2195529) - :package: [`net.neoforged.moddev.repositories:net.neoforged.moddev.repositories.gradle.plugin:0.1.124-pr-80-real-charset-fix`](https://github.com/neoforged/ModDevGradle/packages/2195530) ### Repository Declaration In order to use the artifacts published by the PR, add the following repository to your buildscript: ```gradle repositories { maven { name 'Maven for PR #80' // https://github.com/neoforged/ModDevGradle/pull/80 url 'https://prmaven.neoforged.net/ModDevGradle/pr80' content { includeModule('net.neoforged', 'moddev-gradle') includeModule('net.neoforged.moddev', 'net.neoforged.moddev.gradle.plugin') includeModule('net.neoforged.moddev.repositories', 'net.neoforged.moddev.repositories.gradle.plugin') } } } ```