Volley中文乱码解决方案

Override Request里面的parseNetworkResponse即可。

@Override
protected Response<String> parseNetworkResponse(NetworkResponse response) {
String str = null;
try {
str = new String(response.data, getParamsEncoding());
} catch (UnsupportedEncodingException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return Response.success(str, HttpHeaderParser.parseCacheHeaders(response));
}

By @hyongbai 共439个字

本文链接 http://yourbay.me/all-about-tech/2015/05/28/volley-chinese-error-encoding/