android的HttpClient
发表于:2010年09月09日  分类:Android  Comments Off  0 次浏览 

在pC上,从服务器取得的内容用
比如:
String xml = EntityUtils.toString(httpResponse.getEntity());
xml = new String(xml.getBytes(“ISO-8859-1″),”UTF-8″);
就能得到正常的中文了,但是android下好像不对

试了下,这样就可以了:

String xml = EntityUtils.toString(httpResponse.getEntity(),”unicode”);

只用了一行

固定链接: http://liubin.nanshapo.com/2010/09/09/httpclient-under-android/ | 其实我是一个程序员

报歉!评论已关闭.