title: Symfony BinaryFileResponse forces file download when filename has an accent
body: <p>I am trying to show an image directly in the browser with the help of BinaryFileResponse in a Symfony controller.</p>
  
  <p>On our previous server, this code was working all fine:</p>
  
  <pre><code> $response = new BinaryFileResponse($filePath, 200, [], true, null, true);
   $response-&gt;headers-&gt;addCacheControlDirective('no-cache', true);
   $response-&gt;headers-&gt;addCacheControlDirective('max-age', 0);
   $response-&gt;headers-&gt;addCacheControlDirective('must-revalidate', true);
   $response-&gt;headers-&gt;addCacheControlDirective('no-store', true);
  
   return $response;
  </code></pre>
  
  <p>But since the migration on the new server, when the $filePath contains an accent (àéè, etc), it forces the image to download instead of just showing it.</p>
  
  <p>Both servers have PHP 7.0.10 installed. </p>
  
  <p>Am I missing a config or something? I can't find why it happens.</p>
  
  <p>Any help is gretaly appreciated. Thank you.</p>