php转码函数
程序员文章站
2022-05-29 17:33:31
...
无详细内容 无 iconv('GB2312', 'UTF-8', $str); //将字符串的编码从GB2312转到UTF-8 class ChineseTransfer {public static function big5_gb2312($in) {$in = iconv('UTF-8', 'BIG5', $in);$in = iconv('BIG5', 'GB2312', $in);$out = iconv('GB2312', 'UTF
iconv('GB2312', 'UTF-8', $str); //将字符串的编码从GB2312转到UTF-8
class ChineseTransfer { public static function big5_gb2312($in) { $in = iconv('UTF-8', 'BIG5', $in); $in = iconv('BIG5', 'GB2312', $in); $out = iconv('GB2312', 'UTF-8', $in); return $out; } public static function gb2312_big5($in) { $in = iconv('UTF-8', 'GB2312', $in); $in = iconv('GB2312', 'BIG5', $in); $out = iconv('BIG5', 'UTF-8', $in); return $out; } }