title: How to JSON encode an array with French accents?
body: <p>There are many threads about this but none of them helped me solve this problem.</p>
  
  <pre><code>$array=array(
  "dépendre"=&gt;"to depend",
  "dire"=&gt;"to say",
  "distraire"=&gt;"distracted",
  "être"=&gt;"to be (being)",
  );
  </code></pre>
  
  <p>Gets encoded like this with <code>json_encode</code> :</p>
  
  <pre><code>"d\u00e9pendre":"to depend","dire":"to say","distraire":"distracted","\u00eatre":"to be (being)"
  </code></pre>
  
  <p>So far I have tried this:</p>
  
  <pre><code>array_walk_recursive($array,function($value,$key) {
       $key = urlencode(utf8_decode($key));
  });
  </code></pre>