title: PHP json_decode return error code 4
body: <p>I had previously asked the same question. I would like to decode the json from: <a href="http://pad.skyozora.com/data/pets.json" rel="noreferrer">http://pad.skyozora.com/data/pets.json</a>. Below is the code I used previously:</p>
  
  <pre><code>&lt;?php
  $html=file_get_contents("http://pad.skyozora.com/data/pets.json");
  var_dump(json_decode($html,true)); //return null
  var_dump(json_last_error()); // return 4
  ?&gt;
  </code></pre>
  
  <p>From the last answer I know there is UTF8 DOM in the json return. I tried the answer from a similar question: <a href="https://stackoverflow.com/questions/689185/json-decode-returns-null-after-webservice-call">json_decode returns NULL after webservice call</a>, but all of the answers not work for me. </p>
  
  <p>And after do more research I found a way that works:</p>
  
  <pre><code>&lt;?php
  $html=file_get_contents("http://pad.skyozora.com/data/pets.json");
  $html=preg_replace('/[\x00-\x1F\x80-\xFF]/', '', $html);
  var_dump(json_decode($html, true));
  var_dump(json_last_error());
  ?&gt;
  </code></pre>
  
  <p>This successfully decode the json into array. However all Chinese and Japanese character string were removed too. Any ideas?</p>
  
  <p><strong>Edited:</strong></p>
  
  <p>I used <a href="http://jsonlint.com/" rel="noreferrer">http://jsonlint.com/</a> to decode the json from <a href="http://pad.skyozora.com/data/pets.json" rel="noreferrer">http://pad.skyozora.com/data/pets.json</a>. It stops at here:</p>
  
  <pre><code>[
              161,
              "進化的紅面具",
              0,
              -1,
              0,
          -1,
          1,
          1,
          10,
          50,
          1,
          0,
          0,
          0,
          0,
          [
  
          ],
          [
              0,
              0,
              0,
              0,
              0,
              0,
              0
          ],
          "http:\/\/i.imgur.com\/Y1jZlGW.png",
          [
              "ウルカヌ火山",
              "メジェド
  </code></pre>
  
  <p>and give me the error:</p>
  
  <pre><code>Parse error on line 5001:
  ...山",                "メジェド
  ----------------------^
  Expecting 'STRING', 'NUMBER', 'NULL', 'TRUE', 'FALSE', '{', '['
  </code></pre>
  
  <p>But I couldn't see any problem with this part of json.</p>