title: UrlEncodedFormEntity doesn't encode underscore
body: <p>I want to use a remote API from my Android device, but for some reason, the <em>UrlEncodedFormEntity</em> class doesn't transform the <code>_</code> with <code>%5f</code> like the remote API seems to expect. As a consequence, using this code:</p>
  
  <pre><code>List&lt;NameValuePair&gt; nameValuePairs = new ArrayList&lt;NameValuePair&gt;(1);
  nameValuePairs.add(
      new BasicNameValuePair("json", 
          "{\"params\":{\"player_name\":\"Toto\",
              \"password\":\"clearPass\"},
              \"class_name\":\"ApiMasterAuthentication\",
              \"method_name\":\"login\"}")
      );
  httpPost.setEntity(new UrlEncodedFormEntity(nameValuePairs, HTTP.UTF_8));
  ResponseHandler responseHandler = new BasicResponseHandler();
  httpClient.execute(httpPost, responseHandler);
  </code></pre>
  
  <p>send a post request to the server, with this content:</p>
  
  <pre><code>json=%7B%22params%22%3A%7B%22player_name%22%3A%22Toto%22%2C%22password%22%3A%22clearPass%22%7D%2C%22class_name%22%3A%22ApiMasterAuthentication%22%2C%22method_name%22%3A%22login%22%7D
  </code></pre>
  
  <p>I would like it to be like this (replacing the preivous underscore by %5F):</p>
  
  <pre><code>json=%7B%22params%22%3A%7B%22player%5Fname%22%3A%22Toto%22%2C%22password%22%3A%22clearPass%22%7D%2C%22class%5Fname%22%3A%22ApiMasterAuthentication%22%2C%22method%5Fname%22%3A%22login%22%7D
  </code></pre>
  
  <p>I don't have control over the API, and the official client of the API behave like this. It seems to be the expected behaviour for an <a href="https://en.wikipedia.org/wiki/URL_normalization" rel="nofollow">URL normalization</a></p>
  
  <p>Am I missing something? I first thought it was an UTF-8 encoding issue, but adding <code>HTTP.UTF-8</code> in the constructor of <code>UrlEncodedFormEntity</code> doesn't solve the problem.</p>
  
  <p>Thanks for your help.</p>
  
  <p><strong>EDIT:</strong> Finally, the problem didn't come from this unescape underscore. Even if the other client I tried to reproduce the behaviour escaped it, I only had to set the proper header:</p>
  
  <pre><code>httpPost.addHeader("Content-Type","application/x-www-form-urlencoded");
  </code></pre>
  
  <p>And the request worked just fine. Thanks everyone, and especially singh.jagmohan for his help (even if the problem was finally elsewhere)!</p>