php转码函数
程序员文章站
2022-05-23 14:01:37
...
无详细内容 无 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; } }
下一篇: pytorch 实现VAE排坑记