i18n encoding error
rsp4jack opened this issue ยท 7 comments
- NEC won't load the lang file from resourcepack. I have to replace the file in jar for testing and translating. Of course, a restart is required. It's complex.
- https://github.com/natanfudge/Not-Enough-Crashes/blob/1.16/common/src/main/java/fudge/notenoughcrashes/utils/NecLocalization.java#L80 will load lang file with different charset in different system or jvm options. It's caused this "bug". After I replace the file in jar with a GBK version, it's fine
But I don't think charset read file should be specific to UTF-8. I don't know what's the problem you face let you choose implement it yourself. Using ResourceManager
is a better solution for load lang files.
The issue was that a resource loader was not always available (e.g. in fabric with no fabric api). I'll look at other ways of doing this.