title: PHP json_encode returns null
body: <p>I believe this was caused by this character: <code>%EF%BF%BD</code>, <code>%uFFFD</code>, or <code>�</code>
  other special chars are working fine like <code>%E2%98%86</code>, <code>%u2606</code>, or <code>☆</code></p>
  
  <p>What I am doing it dumping mp3 file tag data with getid3 via ajax, I can work around this by removing the property that has this character as i am not using that part, but I would rather have the character not break my script</p>
  
  <pre><code>require_once('/usr/share/php/getid3/getid3.php');
  $getID3=new getID3;
  die(json_encode((object)array("id3"=&gt;$getID3-&gt;analyze($file)['tags']['id3v2'],"other"=&gt;"data"));
  </code></pre>
  
  <p>From what I have managed to figure out I would guess this character is not a UTF-8 character, so aside from doing something ugly like looping through every property name and property and using <a href="http://php.net/manual/en/function.mb-convert-encoding.php" rel="nofollow noreferrer">mb_convert_encoding</a> on it rebuilding the data is there a reasonable way to do this?</p>