Home  >  Article  >  php教程  >  如何将gbk编码转成utf8格式

如何将gbk编码转成utf8格式

WBOY
WBOYOriginal
2016-06-13 11:20:061337browse

apache 字符集 GB 2312
mysql 字符集 GBK
现要从 mysql 中提出信息(GBK) 写入到 XML 中
XML中的编码格式是 UTF-8
那么,如何将GBK编码成 UTF8 ??
详细介绍:
前一阵子见到了qiushuiwuhen君的关于gbk,unicode,big5的转换的文章
但是多少有一些不太大的问题
于是我设计了一个负责字符转换的类,修正了其中的一些不足,增加了部分功能,以后我会不断扩充该类,来支持更多的字符集
增加了如下几点:
unicode->gbk 符号部分的转换
欧元符(

Statement:
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