修复 Copyright © 显示为“漏”的bug (#3437)
Fixes #3436 Specify UTF-8 charset when reading `deps.json` file in `AboutPage.java`. --- For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/HMCL-dev/HMCL/issues/3436?shareId=XXXX-XXXX-XXXX-XXXX).
This commit is contained in:
@@ -36,6 +36,7 @@ import java.io.IOException;
|
|||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.io.InputStreamReader;
|
import java.io.InputStreamReader;
|
||||||
import java.io.Reader;
|
import java.io.Reader;
|
||||||
|
import java.nio.charset.StandardCharsets;
|
||||||
|
|
||||||
import static org.jackhuang.hmcl.util.i18n.I18n.i18n;
|
import static org.jackhuang.hmcl.util.i18n.I18n.i18n;
|
||||||
import static org.jackhuang.hmcl.util.logging.Logger.LOG;
|
import static org.jackhuang.hmcl.util.logging.Logger.LOG;
|
||||||
@@ -116,7 +117,7 @@ public final class AboutPage extends StackPane {
|
|||||||
return componentList;
|
return componentList;
|
||||||
}
|
}
|
||||||
|
|
||||||
try (Reader reader = new InputStreamReader(input)) {
|
try (Reader reader = new InputStreamReader(input, StandardCharsets.UTF_8)) {
|
||||||
JsonArray array = JsonUtils.GSON.fromJson(reader, JsonArray.class);
|
JsonArray array = JsonUtils.GSON.fromJson(reader, JsonArray.class);
|
||||||
|
|
||||||
for (JsonElement element : array) {
|
for (JsonElement element : array) {
|
||||||
|
|||||||
Reference in New Issue
Block a user