title: send just a string with http Post but error
body: <p>Sorry, I don't speak English very well.</p>
  
  <p>I try to send string "Nhập nội dung bình luận để gửi đi!".</p>
  
  <pre><code>HttpClient httpclient = new DefaultHttpClient();
  HttpPost httppost = new HttpPost(link);
  String str ="Nhập nội dung bình luận để gửi đi!";
  List&lt;NameValuePair&gt; nameValuePairs = new ArrayList&lt;NameValuePair&gt;();
  nameValuePairs.add(new BasicNameValuePair("file", str));
  httppost.setEntity(new UrlEncodedFormEntity(nameValuePairs));
  HttpResponse response = httpclient.execute(httppost);
  </code></pre>
  
  <p>But I get "Nhập nội dung bình l" on my web server. How can I resolve it.</p>
  
  <p><strong>EDIT:</strong></p>
  
  <p>I encoded to UTF-8 by this code:</p>
  
  <pre><code>httppost.setEntity(new UrlEncodedFormEntity(nameValuePairs));
  </code></pre>
  
  <p>replace by:</p>
  
  <pre><code>httppost.setEntity(new UrlEncodedFormEntity(nameValuePairs,"UTF-8"));
  </code></pre>
  
  <p>but it still doesn't work.</p>