title: Special characters disappear in POST request from a android phone
body: <p>I have build an android app that let's you post your name on a website though i form that sends a http POST request to the website. The problem is that 90% av my customers are Swedish and the POST request seems to chop of everything after a special character in a string, including the special character itself.</p>
  
  <p>So the Swedish surname "Börjesson", becomes "B".</p>
  
  <p>my POST request code:</p>
  
  <pre><code>public static String execRequest(String url, Map&lt;String, String&gt; params)
  {
      try {
          DefaultHttpClient defaultHttpClient = new DefaultHttpClient();
          HttpPost httpPost = null;
          HttpGet httpGet = null;
          if(params == null || params.size() == 0) {
              httpGet = new HttpGet(url);
              httpGet.setHeader("Accept-Encoding", "UTF-8");
          }
          else {
              httpPost = new HttpPost(url);
              httpPost.setHeader("Accept-Encoding", "UTF-8");
                  List&lt;NameValuePair&gt; nameValuePairs = new ArrayList&lt;NameValuePair&gt;();
              for(String key: params.keySet()) {
                  nameValuePairs.add(new BasicNameValuePair(key, params.get(key)));
              }
              httpPost.setEntity(new UrlEncodedFormEntity(nameValuePairs));
          }
          HttpResponse httpResponse = (HttpResponse)defaultHttpClient.execute(httpPost == null ? httpGet : httpPost);
          HttpEntity httpEntity = httpResponse.getEntity();
          if(null != httpEntity) {
              InputStream inputStream = httpEntity.getContent();
              Header contentEncoding = httpResponse.getFirstHeader("Content-Encoding");
              if(contentEncoding != null &amp;&amp; contentEncoding.getValue().equalsIgnoreCase("UTF-8")) {
                  inputStream = new GZIPInputStream(inputStream);
              }
              String responseString = convertStreamToString(inputStream);
              inputStream.close();
                  return responseString;
          }
      }
      catch(Throwable t) {
          t.printStackTrace();
      }
      return null;
  }
  </code></pre>
  
  <p>So, any tips of what I'm doing wrong?</p>
  
  <p>Thanks in advance!</p>