title: How to decode json string as UTF-8?
body: <p>I've been working with json for some time and the issue is the strings I decode are encoded as Latin-1 and I cannot get it to work as UTF-8. Because of that, some characters are shown incorrectly (ex. ' shown as &#39;).</p>
  
  <p>I've read a few questions here on stackoverflow, but they doesn't seem to work.</p>
  
  <p>The json structure I'm working with look like this (it is from YouTube API):</p>
  
  <pre><code>...
  "items": [
    {
     ...
     "snippet": {
      ...
      "title": "Powerbeats Pro “Totally Wireless” Except when you need a wire",
      ...
      }
     }
    ]
  
  </code></pre>
  
  <p>I encode it with:</p>
  
  <pre class="lang-dart prettyprint-override"><code>response = await http.get(link, headers: {HttpHeaders.contentTypeHeader: "application/json; charset=utf-8"});
  extractedData = json.decode(response.body);
  dataTech = extractedData["items"];
  
  </code></pre>
  
  <p>And then what I tried was changing the second line to:</p>
  
  <pre class="lang-dart prettyprint-override"><code>extractedData = json.decode(utf8.decode(response.body));
  </code></pre>
  
  <p>But this gave me an error about wrong format. So I changed it to:</p>
  
  <pre class="lang-dart prettyprint-override"><code>extractedData = json.decode(utf8.decode(response.bodyBytes));
  </code></pre>
  
  <p>And this doesn't throw the error, but neither does it fix the problem. Playing around with headers does neither.</p>
  
  <p>I would like the data to be stored in dataTech as they are now, but encoded as UTF-8. What am I doing wrong?</p>