/**
* 给出一段乱码,如何求出原文..
* 疑问是,无论是什么字符,unicode总应该都能显示出来.能否转成unicode编码达到效果.
*/$str = 'manufacturering 12鈥? 16鈥? 20鈥? 24鈥? 36鈥?48鈥? 60, 72", 84",96",120" sphere, Various styles';//求解....
* 给出一段乱码,如何求出原文..
* 疑问是,无论是什么字符,unicode总应该都能显示出来.能否转成unicode编码达到效果.
*/$str = 'manufacturering 12鈥? 16鈥? 20鈥? 24鈥? 36鈥?48鈥? 60, 72", 84",96",120" sphere, Various styles';//求解....
检查出是UTF-8,尝试转换成UTF-8,结果问号没有转换
manufacturering 12? 16? 20? 24? 36?48? 60, 72", 84",96",120" sphere, Various styles
你需要给出原始的数据,必要时用 base64_encode 编一下码
echo mb_convert_encoding('YOUR_MASS', 'utf-8');
结果如下:manufacturering 12? 16? 20? 24? 36?48? 60, 72", 84",96",120" sphere, Various styles
没有编码成功
意思是说有可能不在unicode字符集之内?
// 鈥
/*
for($i=0x80; $i<0xfe; $i++)
for($j=0x60; $j<0xfe; $j++)
echo iconv('gbk', 'utf-8', chr($i).chr($j)) . ",$i $j ";
*/
foreach(array(170,172,173,174,175,176,177,228,228,235,249) as $n)
echo chr(161).chr($n);
/*
—‖…‘’“”′′‰※
*/根据上下文,为 ” 的可能性最大