mirror of
https://github.com/HMCL-dev/HMCL.git
synced 2024-11-27 06:10:08 +08:00
fix: doGet utf-8. #992.
This commit is contained in:
parent
475d7f50f1
commit
b10330548e
@ -21,6 +21,7 @@ import org.jackhuang.hmcl.util.Pair;
|
||||
|
||||
import java.io.*;
|
||||
import java.net.*;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.*;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
@ -173,7 +174,7 @@ public final class NetworkUtils {
|
||||
public static String doGet(URL url) throws IOException {
|
||||
HttpURLConnection con = createHttpConnection(url);
|
||||
con = resolveConnection(con);
|
||||
return IOUtils.readFullyAsString(con.getInputStream());
|
||||
return IOUtils.readFullyAsString(con.getInputStream(), StandardCharsets.UTF_8);
|
||||
}
|
||||
|
||||
public static String doPost(URL u, Map<String, String> params) throws IOException {
|
||||
|
Loading…
Reference in New Issue
Block a user