[FIX] getParamsFromUri UTF-8

This commit is contained in:
Gravita 2021-08-17 15:05:27 +07:00
parent 3e973c5de3
commit dc3d75c650

View file

@ -12,7 +12,7 @@
import pro.gravit.utils.helper.IOHelper;
import java.net.URLDecoder;
import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
import java.util.Comparator;
import java.util.HashMap;
import java.util.Map;
@ -86,7 +86,7 @@ default Map<String, String> getParamsFromUri(String uri) {
String[] result = sub.split("&");
Map<String, String> map = new HashMap<>();
for (String s : result) {
String c = URLDecoder.decode(s, Charset.defaultCharset());
String c = URLDecoder.decode(s, StandardCharsets.UTF_8);
int index = c.indexOf("=");
if (index <= 0) {
continue;