I want to encode Chinese to \\u5de5\\u4f5c formate in php. -
i want encode chinese \u5de5\u4f5c formate in php. there builtin php function or method ?
the function json_encode()
can used escape utf-8 encoded strings unicode format.
example:
<?php echo json_encode('工作');
output:
"\u5de5\u4f5c"
Comments
Post a Comment