title: Php fopen or fwrite creates text with unicode
body: <p>I'm trying to write a file with fopen and fwrite. I have an array that displays fine when printing it.</p>
  
  <p>For instance i can see <code>"Délai de livraison"</code> being printed out.</p>
  
  <p>After creating a file, it is displayed as: <code>"D\u00e9lai de livraison"</code>.
  And "\u00e9" is unicode if I understand right.</p>
  
  <p>I have tried adding a "BOM" and writing it to the beginning of the file, but there is no change.</p>
  
  <pre><code>//Write $newarray to a file   
  
  $filename = 'translations_fr.json';
  
   //create json file
   $file = base_path('/imports/') . $filename;
   $fp = fopen($file, 'w');
  
   //BOM 
    fwrite($fp, "\xEF\xBB\xBF");
  
  fwrite($fp, json_encode($newarray));
  fclose($fp);
  </code></pre>
  
  <p>My IDE is Netbeans and it is configured with UTF-8 as default.
  I tried utf8_encode(), but no luck.
  What can I do?</p>