字符编码相关编程
去掉bom头
function removeBom($string)
{
if(substr($string, 0, 3) == pack("CCC", 0xef, 0xbb, 0xbf)) {
return substr($string, 3);
}
return $string;
}
汉字转拼音类
Last updated
Was this helpful?
去掉bom头
function removeBom($string)
{
if(substr($string, 0, 3) == pack("CCC", 0xef, 0xbb, 0xbf)) {
return substr($string, 3);
}
return $string;
}
汉字转拼音类
Last updated
Was this helpful?