HttpPost post=new HttpPost(url); StringEntity content=new StringEntity(data, Charset.forName("utf-8"));// 第二個參數,設置後纔會對,內容進行編碼 content.setContentType("application/json; charset=UTF-8"); content.setContentEncoding("utf-8"); post.setEntity(content);