首页 >后端开发 >php教程 > PHP编码变换类3

PHP编码变换类3

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB原创
2016-06-13 13:07:30912浏览

PHP编码转换类3

PHP编码转换类请下载附件,包含文件:

?converter.class.php
/tables/BIG2GB.Table
/tables/BIG2UNI.Table
/tables/big5-unicode.table
/tables/GB2BIG.Table
/tables/gb-big5.table
/tables/GBK2PY.Table
/tables/GBK2UNI.Table
/tables/gb-unicode.table
/tables/UNI2BIG.Table
/tables/UNI2GBK.Table

?

使用方法:

$Conv=new converter;
$String='GB2312转BIG(简转繁体)';
$String=$Conv->convert('GB','BIG',$String);
$String='BIG转GB2312(繁转简体);
$String=$Conv->convert('BIG','GB',$String);
$String='GBK转UTF';
$String=$Conv->convert('GBK','UTF',$String);
$String='BIG转UTF';
$String=$Conv->convert('BIG','UTF',$String);
$String='UTF转GBK';
$String=$Conv->convert('UTF','GBK',$String);
$String='UTF转BIG';
$String=$Conv->convert('UTF','BIG',$String);

?

支持GBK,UTF,BIG5和unicode等编码互转,以及汉字转拼音。

声明:
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn