
Properly escaping unicode in fabric.mod.json
PerikiyoXD opened this issue · 3 comments
Project fabric.mod.json
{
"schemaVersion": 1,
"id": "dsurround",
"version": "${version}",
"name": "\u00a76Dynamic Surroundings\u00a7r: \u00a7eFabric Edition",
...
Output fabric.mod.json
(jar)
{
"schemaVersion": 1,
"id": "dsurround",
"version": "0.0.4",
"name": "§6Dynamic Surroundings§r: §eFabric Edition",
...
As you can see, name
escapes \u00a76
into §
when resources are processed.
To fix the issue:
build.gradle
:
filesMatching("fabric.mod.json") {
- expand "version": project.version
+ expand (version: project.version) {
+ escapeBackslash = true
+ }
}
This work has been done over fork/branch for 1.18.2. Extrapolates to this repo as well.
Fixing up various json files to use the unicode escape. Will show up in the 1.20.4 update.