关于网友提出的“android从服务器取数据时中午乱码”问题疑问,本网通过在网上对“android从服务器取数据时中午乱码”有关的相关答案进行了整理,供用户进行参考,详细问题解答如下:
问题:android从服务器取数据时中午乱码
描述: HttpPost post=new HttpPost(StaticInfo.FINDALLNEWS);
List params = new ArrayList();
try {
post.setEntity(new UrlEncodedFormEntity(params,
"UTF-8"));
} catch (UnsupportedEncodingException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
try {
HttpResponse response = httpClient.execute(post);
if(response.getStatusLine().getStatusCode()!=404){
String info=EntityUtils.toString(response.getEntity(),"UTF-8");
System.out.println("info--"+info);
客户端代码如上,但取出来的数据中午乱码,请问哪位大侠帮看下?
以上介绍了“android从服务器取数据时中午乱码”的问题解答,希望对有需要的网友有所帮助。
本文网址链接:http://www.codes51.com/itwd/1279755.html