Conversion of u6784 type Chinese characters to u6784 and how to transfer Chinese characters (convert to Chinese characters that can be understood by a person) through php and js, such as $ stringu6784 ------ solution ------------------ echo & nbsp; json_decode (u6784); ------ \ u6784 type conversion of Chinese characters
How to transfer Chinese characters such as \ u6784 through php and js (convert to a Chinese character that can be understood by a person), for example, $ string = '\ u6784'
------ Solution --------------------
Echo json_decode ('"\ u6784"'); // Structure
------ Solution --------------------
Reference:
Echo json_decode ('"\ u6784"'); // Structure
Are you sure this is feasible? The result returned by my test is null.
My practice is to construct a json string and decode
$ String = '\ u6784 ';
$ Json_str = '{"str": "'. $ string .'"}';
Var_dump (json_decode ($ json_str, 1 ));
------ Solution --------------------
Do not doubt people's sincerity
The running result of your code:
'Str' => string ''(length = 3)
------ Solution --------------------
Use json_decode to solve Unicode height