title: How to solve JSON_ERROR_UTF8 error in php json_decode?
body: <p>I am trying this code </p>
  
  <pre><code>$json = file_get_contents("http://www.google.com/alerts/preview?q=test&amp;t=7&amp;f=1&amp;l=0&amp;e");
  print_r(json_decode(utf8_encode($json), true));
  
          //////////////
  
  // Define the errors.
  $constants = get_defined_constants(true);
  $json_errors = array();
  foreach ($constants["json"] as $name =&gt; $value) {
      if (!strncmp($name, "JSON_ERROR_", 11)) {
          $json_errors[$value] = $name;
      }
  }
  
  // Show the errors for different depths.
  foreach (range(4, 3, -1) as $depth) {
      var_dump(json_decode($json, true, $depth));
      echo 'Last error: ', $json_errors[json_last_error()], PHP_EOL, PHP_EOL;
  }
  </code></pre>
  
  <p>I've tried a lot of functions, html_entities_decode, utf8_encode and decode, decoding the hex codes, but I always get the error "JSON_ERROR_UTF8".</p>
  
  <p><strong>How could I solve this?</strong></p>