json_encode() turn non-UTF8 strings into null, but on live site returns false
问题 In the framework I have to use for a project (Lithium) the output on a specific page goes through json_encode() . Locally and on live I try with one and the same data, and the result is: Locally it returns the JSON, but some of the values are turned into null . Live site - it returns false . In both cases when I run json_last_error() - it gives me int(5) . I can run phpinfo() on both places, if some setting is causing the problem. (Locally I'm with PHP 5.3.*, on live it's 5.5.9.) 回答1: