use*_*914 3 php encoding utf-8 utf
$str使用 成功解密 AES 密码后,我在变量上有一个字符串mcrypt_decrypt。如果我尝试打印str到屏幕,我确实注意到每个字母之间有一个空格,这实际上是NULL termination (\x00)由UTF-16字符编码给出的。
$str
mcrypt_decrypt
str
NULL termination (\x00)
UTF-16
Array ( [1] => 33 [2] => 0 [3] => 34 [4] => 0 [5] => 35 [6] => 0 ... )
我尝试了很多方法来改变它,UTF-8但都失败了。我能做些什么?
UTF-8
Mat*_*aga 5
您应该使用mb-convert-encoding函数
$str = mb_convert_encoding($str, "UTF-8" , "UTF-16LE");
归档时间:
9 年,8 月 前
查看次数:
10075 次
最近记录: