iconv是转换编码的,但是在中文转码时候出现显示不全问题。
代码如下:
加上//IGNORE,忽略错误
或者用mb_convert_encoding()@H_403_4@
代码如下:
/ 将 EUC-JP 转换成 UTF-7 /
$str = mb_convert_encoding($str,"UTF-7","EUC-JP");
@H_403_4@
$str = mb_convert_encoding($str,"UTF-7","EUC-JP");
/ 从 JIS,eucjp-win,sjis-win 中自动检测编码,并转换 str 到 UCS-2LE /
$str = mb_convert_encoding($str,"UCS-2LE","JIS,sjis-win");
/ "auto" 扩展成 "ASCII,JIS,UTF-8,EUC-JP,SJIS" /
$str = mb_convert_encoding($str,"EUC-JP","auto");
?>
保险就用mb_conver_encoding@H_403_4@ 原文链接:https://www.f2er.com/php/22854.html