He is using Windows OS with (most likely) a European locale. The exact locale is still unknown so far.
He was editing zh_cn.lang using the ${game_dir}/resources folder-based resourcepack which is provided by B.A.S.E., for his items created via ContentTweaker.
Synopsis
BaseFileUtils
uses potentially different charset for reading and writing files (specifically theFileUtils.writeStringToFile(file, string, Charset.defaultCharset());
part), which may cause issues when dealing with multiple languages. https://github.com/The-Acronym-Coders/BASE/blob/2ef4890b60c5658a2c16ae36bb09bc7b2ebb0321/src/main/java/com/teamacronymcoders/base/util/files/BaseFileUtils.java#L133-L152Reproduction
@wormzjl has the following setup:
zh_cn.lang
using the${game_dir}/resources
folder-based resourcepack which is provided by B.A.S.E., for his items created via ContentTweaker.fixLang
functionality is the culprit: https://github.com/The-Acronym-Coders/BASE/blob/2ef4890b60c5658a2c16ae36bb09bc7b2ebb0321/src/main/java/com/teamacronymcoders/base/util/files/ResourceLoader.java#L75-L79 which in turns invokesBaseFileUtils.writeStringToFile
as shown above.Analysis
See above. TLDR: asymmetrical I/O handling to the extent of charset.
Proposed fix
Final words
N/A