title: PHP: Export to CSV with special characters
body: <p>I am trying to export some data that is stored on a table but when I tried to export to CSV this letter č shows like Ä or &amp;#269.</p>
  
  <p>I tried everithing utf8_decode, utf8_enconde, html_entity_decode, but is not working. What can I do?</p>
  
  <p>Thanks,
  Leandro.</p>
  
  <p>Additional Information: Now I directly testing the following:</p>
  
  <pre><code>$delimiter = ";";
  $enclosure = '"';
  
  header("Content-Disposition: attachment; filename=memorandos.csv");
  header("Pragma: no-cache");
  header("Expires: 0");
  $output = fopen('php://output', 'w');
  
  $header = array('Apellido');
  fputcsv($output, $header, $delimiter, $enclosure);
  $memorando = Memorando::getById(3263);
  if ($memorando){
      $dd = array ();
      $dd[] = $memorando-&gt;apellido;   ////ON THE DATABSE IS STORED LIKE Jurič
      fputcsv($output, $dd, $delimiter, $enclosure);
  }
  </code></pre>
  
  <p>On the file I see this Juri&amp;#269 ; instead of Jurič</p>