Home  >  Article  >  Backend Development  >  PHP的内码转换函数 mb_convert_encoding()_PHP教程

PHP的内码转换函数 mb_convert_encoding()_PHP教程

WBOY
WBOYOriginal
2016-07-20 11:04:20637browse

因为某程序要用输出UTF-8编码..但是原数据是GBK编码的
百度 找了很多有关内码转换的类..但是缺点很多.又不支持GBK TO UTF-8
不过一个一个找还是在PHP官方的FAQ找到了mb_convert_encoding() 该函数要在PHP4.0.6以上才有..听说有的
想关链接: http://cn.php.net/manual/zh/function.mb-convert-encoding.php
做一个GBK To UTF-8
header("content-Type: text/html; charset=Utf-8");
echo mb_convert_encoding("

www.bkjia.comtruehttp://www.bkjia.com/PHPjc/445203.htmlTechArticle因为某程序要用输出UTF-8编码..但是原数据是GBK编码的 百度 找了很多有关内码转换的类..但是缺点很多.又不支持GBK TO UTF-8 不过一个一个找还...
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