title: Flutter: Parsing Json with special characters (utf-8)
body: <p>I have a pretty basic php code that generates a JSON file with some data:</p>
  
  <pre><code>$json = json_encode($theData, JSON_PRETTY_PRINT | JSON_FORCE_OBJECT | JSON_UNESCAPED_UNICODE);
  file_put_contents('api.json', $json);
  </code></pre>
  
  <p>When I parse it in my Flutter app, it returns special characters and not characters like "éóáêô".</p>
  
  <p>I was parsing json file in Flutter like this:</p>
  
  <pre><code>var data = await http.get("xxxx/api.json", headers: {'Content-Type': 'application/json'});
  if (data.statusCode == 200) {
      print('Status Code 200: Ok!');
      var jsonData = json.decode(data.body);
  </code></pre>
  
  <p>Then, I figure out that changing:</p>
  
  <pre><code>json.decode(data.body);
  </code></pre>
  
  <p>by:</p>
  
  <pre><code>json.decode(utf8.decode(data.bodyBytes));
  </code></pre>
  
  <p>Solved the problem!</p>
  
  <p><strong>Question is: Why using utf8.decode and bodyBytes solved the problem? Am I creating the JSON file with PHP properly?</strong></p>