乱码问题

1.volley 读取 json  需要转码

String s =new String(response.getBytes("ISO-8859-1"),"utf-8");

 

2.volley 读取 xml (编码为gb2312) 需要转码

String string1 = new String(sb.toString().getBytes("iso8859-1"), "gb2312");

 

3.直接读取 gb2312 的xml  需要转码

new InputStreamReader(new FileInputStream(filename), "gb2312")

posted @ 2016-07-15 08:37  weidingqiang  阅读(121)  评论(0)    收藏  举报