$data = json_encode($data); $data = preg_replace_callback('/\\\\u([0-9a-fA-F]{4})/u', function ($match) { return mb_convert_encoding(pack('H*', $match[1]), "utf-8", "UTF-16BE"); }, $data);