我使用 当JSON.stringify函数对unicode字符进行编码以格式化 JSON.stringify() code>函数来串联化JS对象,以便将AJAX发送到PHP 。 p>
\ uxxxx code>(例如
\ u000a code>)时,会出现问题。 我的问题是如何将这些字符转换为PHP中的常规unicode字符? p>
div>
I use JSON.stringify()
function to stringify JS objects for AJAX sending to PHP.
The problem arises when JSON.stringify function encodes unicode characters to format \uxxxx
(eg. \u000a
). My question is how to convert those characters to regular unicode characters in PHP?