PHP decoding and encoding json with unicode characters

前端 未结 8 1007
野性不改
野性不改 2020-11-27 17:46

I have some json I need to decode, alter and then encode without messing up any characters.

If I have a unicode character in a json string it will not decode. I\'m n

8条回答
  •  暗喜
    暗喜 (楼主)
    2020-11-27 18:26

    JSON_UNESCAPED_UNICODE was added in PHP 5.4 so it looks like you need upgrade your version of PHP to take advantage of it. 5.4 is not released yet though! :(

    There is a 5.4 alpha release candidate on QA though if you want to play on your development machine.

提交回复
热议问题