解决Android发送json时,服务端解析中文乱码

添加以下语句,将数据转换为UTF-8编码

HttpPost httpPost = new HttpPost(uri);

httpPost.setEntity(new StringEntity(postData.toString(),"UTF-8"));


即可

你可能感兴趣的:(解决Android发送json时,服务端解析中文乱码)