fix: Read instance.cfg with wrong encoding (#1023)

This commit is contained in:
Glavo 2021-09-12 01:11:49 +08:00 committed by GitHub
parent 275c14f556
commit 2d543e69ff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -24,7 +24,9 @@ import org.jackhuang.hmcl.util.io.FileUtils;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
import java.nio.file.FileSystem;
import java.nio.file.Files;
import java.nio.file.Path;
@ -67,7 +69,7 @@ public final class MultiMCInstanceConfiguration {
private MultiMCInstanceConfiguration(String defaultName, InputStream contentStream, MultiMCManifest mmcPack) throws IOException {
Properties p = new Properties();
p.load(contentStream);
p.load(new InputStreamReader(contentStream, StandardCharsets.UTF_8));
this.mmcPack = mmcPack;