Config-Updater icon indicating copy to clipboard operation
Config-Updater copied to clipboard

Allow UTF-8 Charset

Open JewishBanana opened this issue 1 year ago • 0 comments

Not really an issue more of just an added bonus, I noticed that Chinese characters weren't being saved over from config updates and that's because when you are loading the current config you don't load it with UTF-8 charset. So to fix this just change this one line here: FileConfiguration currentConfig = YamlConfiguration.loadConfiguration(toUpdate); at this line To this: FileConfiguration currentConfig = YamlConfiguration.loadConfiguration(new InputStreamReader(FileUtils.openInputStream(toUpdate), StandardCharsets.UTF_8)); This uses the apache file utils class.

JewishBanana avatar Jul 19 '24 02:07 JewishBanana