http 返回的数据解析后 汉字格式不对"\u516c\u53f8\u5927\u4f1a"
android http发送post请求后 返回的数据,解析后,数字、字母都正常,但是汉字变成 "\u516c\u53f8\u5927\u4f1a"这种类型,怎么再转换成汉字呢? 因为我要将他再赋值给其他string,并显示成汉字(如:string str = ret。).
求教?急啊,急啊,急啊!
我的代码如下:
DefaultHttpClient mHttpClient=new DefaultHttpClient();
HttpPost mHttpPost=new HttpPost(url);
List<NameValuePair> nvp= new ArrayList<NameValuePair>();
nvp.add(new BasicNameValuePair("userId", accid));
mHttpPost.setEntity(new UrlEncodedFormEntity(nvp));
HttpResponse mHttpResp=mHttpClient.execute(mHttpPost);
String ret = EntityUtils.toString(mHttpResp.getEntity(), "UTF-8");
Toast.makeText(CheckListView5.this, ret, Toast.LENGTH_LONG).show();
此处ret为"\u516c\u53f8\u5927\u4f1a"这种格式。而我希望带到的是汉字,如:“中国”。