Commit bd4f3115 by Jason Song

fix default charset issue

parent 1ca1b8d1
......@@ -16,6 +16,7 @@ import com.google.common.base.Function;
import com.google.common.io.BaseEncoding;
import com.google.common.io.CharStreams;
import com.google.gson.Gson;
import java.nio.charset.StandardCharsets;
/**
* @author Jason Song(song_s@ctrip.com)
......@@ -104,7 +105,7 @@ public class HttpUtil {
statusCode = conn.getResponseCode();
if (statusCode == 200) {
isr = new InputStreamReader(conn.getInputStream());
isr = new InputStreamReader(conn.getInputStream(), StandardCharsets.UTF_8);
String content = CharStreams.toString(isr);
return new HttpResponse<>(statusCode, serializeFunction.apply(content));
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment