Home > php教程 > php手册 > php转码函数

php转码函数

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-06 19:37:32
Original
1173 people have browsed it

无详细内容 无 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
Copy after login
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;

} 



}
Copy after login
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
php data acquisition?
From 1970-01-01 08:00:00
0
0
0
PHP extension intl
From 1970-01-01 08:00:00
0
0
0
How to learn php well
From 1970-01-01 08:00:00
0
0
0
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template