upd: server.properties中文自动转换unicode编码

This commit is contained in:
小林 2022-03-29 17:46:38 +08:00
parent 46ac2f9bb6
commit 2354949dd5

View File

@ -67,6 +67,9 @@ export class ProcessConfig {
if (this.iProcessConfig.type === "properties") {
text = properties.stringify(object);
text = text.replace(/ = /gim, "=");
if (this.iProcessConfig.fileName == "server.properties") {
text = text.replace(/\\\\u/gim, "\\u");
}
}
if (this.iProcessConfig.type === "json") {
text = JSON.stringify(object);