title: C# HttpClient handle swedish characters åäö in response
body: <p>When sending a test request in Burp I get correct values for åäö in Swedish but using HttpClient I only get this character: �</p>
  
  <p><a href="https://i.stack.imgur.com/SSMuu.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/SSMuu.png" alt="enter image description here"></a></p>
  
  <p>I have tried setting the <code>Accept-Language</code> header to <code>sv-SE</code> and <code>sv</code> but with the same result. I have also tried getting <code>GetByteArrayAsync</code> and converting this to UTF-8 but no luck there neither.</p>
  
  <pre><code>private HttpClient client = new HttpClient();
  
  public HttpService()
  {
      client.DefaultRequestHeaders.Add("Accept-Language", "sv");
      client.DefaultRequestHeaders.Add("Accept-Charset", "utf-8");
  }
  
  public string GetRequest(string url)
  {
      using (HttpResponseMessage response = client.GetAsync(url).Result)
      {
          //Same result
          //var byteArray = response.Content.ReadAsByteArrayAsync().Result;
          //var result = Encoding.UTF8.GetString(byteArray, 0, byteArray.Length);
          using (HttpContent content = response.Content)
          {
              var result = content.ReadAsStringAsync().Result;
              return result;
          }
      }
  
  }
  </code></pre>
  
  <p><strong>Update:</strong></p>
  
  <p>Headers from server:</p>
  
  <pre><code>HTTP/1.1 200 OK
  Cache-Control: private
  Content-Length: 31903
  Content-Type: application/json
  Expires: Sun, 14 May 2017 22:00:00 GMT
  Server: Microsoft-IIS/8.5
  Set-Cookie: ASPSESSIONIDCSACQTRA=&lt;REMOVED&gt;; path=/
  X-Powered-By: ASP.NET
  Date: Mon, 15 May 2017 13:10:18 GMT
  </code></pre>