PHP Code Conversion Class 3
PHP Encoding Conversion class Please download the attachment, including the file:
? 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
?
How to use:
$Conv =new Converter; $String = ' GB2312 turn BIG (simple to Traditional) '; $String = $Conv->convert (' GB ', ' BIG ', $String); $String = ' Big turn GB2312 (simplified), $String = $Conv->convert (' BIG ', ' GB ', $String); $String = ' gbk to UTF '; $String = $Conv->convert (' GBK ', ' utf ', $String); $String = ' big turn UTF '; $String = $Conv->convert (' big ', ' utf ', $String); $String = ' utf to GBK '; $String = $Conv->convert (' utf ', ' GBK ', $String); $String = ' utf turns BIG '; $String = $Conv->convert (' utf ', ' BIG ', $String);
?
Support Gbk,utf,big5, Unicode and other encodings, as well as Chinese pinyin.