php mb_convert_encoding 字符串编码
2013-11-11 11:03
645 查看
1介绍 mb_convert_encoding( $str, $encoding1,$encoding2 ) $str,要转换编码的字符串 $encoding1,目标编码,如utf-8,gbk,大小写均可 $encoding2,原编码,如utf-8,gbk,大小写均可 2实例1 <?php $str='编码'; echo mb_convert_encoding($str, "UTF-8"); //编码转换为utf-8 ?> 3实例2 <?php $str='编码'; echo mb_convert_encoding($str, "UTF-8", "GBK"); //已知原编码为GBK,转换为utf-8 ?> 4实例3 <?php $str='编码'; echo mb_convert_encoding($str, "UTF-8", "auto"); //未知原编码,通过auto自动检测后,转换编码为utf-8 ?>
相关文章推荐
- PHP mb_convert_encoding 获取字符串编码类型实现代码
- php 转换字符串编码 iconv与mb_convert_encoding的区别说明
- PHP字符串编码转码iconv与mb_convert_encoding用法和区别
- PHP mb_convert_encoding 获取字符串编码类型实现代码
- php 转换字符串编码 iconv与mb_convert_encoding的区别说明
- php自动获取字符串编码函数mb_detect_encoding
- php自动获取字符串编码函数mb_detect_encoding 详细出处参考:http://www.jb51.net/article/27282.htm
- PHP mb_convert_encoding文字编码的转换函数介绍
- php使用mb_check_encoding检查字符串在指定的编码里是否有效
- php自动获取字符串编码函数mb_detect_encoding
- PHP mb_convert_encoding文字编码的转换函数介绍
- php自动获取字符串编码函数mb_detect_encoding
- PHP 判断字符串是否符合指定格式编码-mb_check_encoding
- php转化编码函数iconv与mb_convert_encoding
- PHP 获取文件 或 字符串的编码方式 mb_detect_encoding()
- php自动获取字符串编码函数mb_detect_encoding
- PHP 获取文件 或 字符串的编码方式 mb_detect_encoding()
- php使用mb_check_encoding检查字符串在指定的编码里是否有效
- php自动获取字符串编码函数mb_detect_encoding
- php自动获取字符串编码函数mb_detect_encoding