有谁理解编码知识,utf-8,gbk,big2,unicode 之间的转换?请高手帮忙啊
function chsutoutf8($c)
{
$str='';
if ($c {
$str .= $c;
}
elseif ($c {
$str .= (0xc0 | $c >> 6);
$str .= (0x80 | $c & 0x3f);
}
elseif ($c {
$str .= (0xe0 | $c >> 12);
$str .= (0x80 | $c >> 6 & 0x3f);
$str .= (0x80 | $c & 0x3f);
}
elseif ($c {
$str .= (0xf0 | $c >> 18);
$str .= (0x80 | $c >> 12 & 0x3f);
$str .= (0x80 | $c >> 6 & 0x3f);
$str .= (0x80 | $c & 0x3f);
}
return $str;
}
qq:1302781404
希望能够解决!
------解决方案--------------------
你写的这个有问题?
------解决方案--------------------
编码转换的过程是
1)先解码-》再用另一种方式去编码