title: json_encode JSON_UNESCAPED_SLASHES not working and still escaping slashes
body: <p>My autocomplete search feature is broken because of how characters with accents are stored in the mySQL.</p>
  
  <p>For example, in the mySQL column, É is stored like \u00c9</p>
  
  <p>In the PHP, which receives the user's input and calls on mySQL, É is \xc3\x89</p>
  
  <p>json_encode() almost works perfectly to take "\xc3\x89" and convert it to "\u00c9"</p>
  
  <pre><code>$clean = json_encode($criteria, JSON_UNESCAPED_SLASHES);
  </code></pre>
  
  <p>Except it converts it to "\\u00c9" and so the characters don't match even though they are both É.</p>
  
  <p>The option JSON_UNESCAPED_SLASHES isn't working.  Why does it not keep another backslash from being added in front of the backslash?</p>
  
  <p>How do I get this to work?</p>
  
  <p>Edit: I just added the actual code and error log output below. code:</p>
  
  <pre><code>error_log("criteria vvvvvvvvvvvvv");
  error_log($criteria);
  
  $clean = json_encode($criteria, JSON_UNESCAPED_SLASHES);  
  
  error_log("json_encode(criteria) vvvvvvvvvvvvvv");
  error_log($clean);
  </code></pre>
  
  <p>The error log:</p>
  
  <pre><code>[Fri Aug 23] criteria vvvvvvvvvvvvvvv, 
  [Fri Aug 23 \xc3\x89
  [Fri Aug 23] json_encode(criteria) vvvvvvvvvvvvvvv, 
  [Fri Aug 23] "\\u00c9"
  </code></pre>