Skip to content

Commit

Permalink
修复 Copyright © 显示为“漏”的bug (#3437)
Browse files Browse the repository at this point in the history
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).
  • Loading branch information
Wulian233 authored Nov 10, 2024
1 parent c1ae587 commit 9a0db56
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion HMCL/src/main/java/org/jackhuang/hmcl/ui/main/AboutPage.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.Reader;
import java.nio.charset.StandardCharsets;

import static org.jackhuang.hmcl.util.i18n.I18n.i18n;
import static org.jackhuang.hmcl.util.logging.Logger.LOG;
Expand Down Expand Up @@ -116,7 +117,7 @@ private static ComponentList loadIconedTwoLineList(String path) {
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);

for (JsonElement element : array) {
Expand Down

0 comments on commit 9a0db56

Please sign in to comment.