How does php display Unicode escape strings returned by curl? Such as "\u6b22\u8fce\u56de\u6765"
淡淡烟草味2017-05-16 13:05:33
0
2
1582
php's curl returns string(42) "{"ret":1,"msg":"u6b22u8fceu56deu6765"}". Want to know how to display the correct text? "u6b22u8fceu56deu6765" corresponds to "Welcome back"
If you can handle the server side, you can control whether Chinese is not encoded through the second parameter of json_encode. http://php.net/manual/zh/func... If you can’t process the server, you can process the result returned by curl. First decode json, and then re-json_encode (also controlled according to the second parameter)
If you can handle the server side, you can control whether Chinese is not encoded through the second parameter of json_encode.
http://php.net/manual/zh/func...
If you can’t process the server, you can process the result returned by curl. First decode json, and then re-json_encode (also controlled according to the second parameter)
The answerer still didn't explain it in detail enough, so the newbie can only search slowly on the Internet...I found a perfect solution:
Reference: http://www.manongjc.com/artic...