Here is the PHP code:
$arr=array(228,184,173,230,150,135,99,104,105,110,101,115,101); $str=''; foreach ($arr as $i){ $str.=chr($i); } print $str;
Conclusion: 中文chinese
Here is the javascript code:
var arr=[228,184,173,230,150,135,99,104,105,110,101,115,101]; var str=''; for (i in arr){ str+=String.fromCharCode(arr[i]); } console.log(str);
conclusion: 䏿chinese
So how do I handle an array in javascript?
javascript utf-8
solomon_wzs
source share