title: RestSharp deserialize utf-8 content into a class
body: <p>I am making a REST API call and the response JSON consists of UTF8-8 encoding. How can I deserialize into a class and have the encoding intact? Though this code doesn't fail but I lose the encoding.</p>
  
  <pre><code>var request = new RestRequest("some url", Method.GET);
  request.AddHeader("Accept-Charset","utf-8");
  request.AddHeader("Accept","*/*");
  request.AddHeader("ContentType","application/x-www-form-urlencoded; charset=UTF-8");
  request.AddHeader("Accept-Encoding", "gzip, deflate, br");
  request.AddUrlSegment("FrameworkGUID", FrameworkGUID);
  var response = Client.Execute&lt;RootObject&gt;(request);
  var str = System.Text.Encoding.UTF8.GetString(Encoding.ASCII.GetBytes(response.Content));
  return JsonConvert.DeserializeObject&lt;RootObject&gt;(str);
  </code></pre>
  
  <p>JSON response:</p>
  
  <pre><code>{"fullStatement":"Extend polynomial identities to include factoring with complex numbers. For example, rewrite x\u00b2 + 4 as (x + 2i)(x \u2013 2i).","language":"en"} 
  </code></pre>
  
  <p><strong>Edit:</strong> I wasn't debugging correctly. The deserialization is happening fine. In fact you just need this code:</p>
  
  <pre><code>var request = new RestRequest("some url", Method.GET);
  request.AddUrlSegment("FrameworkGUID", FrameworkGUID);
  var response = Client.Execute&lt;RootObject&gt;(request);
  return response.Data;
  </code></pre>