title: Slim Framework: Setting encoding on response
body: <p>I'm having trouble setting the encoding on the response.
  Tried:</p>
  
  <ul>
  <li>$app->contentType('text/html; charset=utf-8');   </li>
  <li>header("Content-Type: application/json");  </li>
  <li>$app->response()->header('Content-Type', 'application/json;charset=utf-8');  </li>
  </ul>
  
  <p>I'm stuck... :-/</p>
  
  <p><strong>EDIT</strong><br>
  I've downloaded the <code>Slim/slim-skeleton</code> via Composer.</p>
  
  <p>I need to return JSON in my <code>Route.php</code>:</p>
  
  <pre><code>$app-&gt;get('/getStoresByBounds', function () use ($app, $stores) {
      $app-&gt;contentType('application/json');
  
      $myStores = $stores-&gt;getStores();
  
      $app-&gt;response()-&gt;write(json_encode($myStores));
  
      $app-&gt;stop();
  });
  </code></pre>