iconv() Detected an illegal character in input string
来源:互联网 发布:淘宝如何申请小号 编辑:程序博客网 时间:2024/04/30 09:46
在php中利用iconv函数转化汉字字符串时提示如下错误:
Notice: iconv() [function.iconv]: Detected an illegal character in input string in a.php on line 796
出错的语句如下:
iconv("GB2312","UTF-8",$a);
解决办法,将GB2312更改为GBK即可搞定:
iconv("GBK","UTF-8",$a);
出现这个错误的原因是字符串$a中出现了超出gb2312范围的字符,所以iconv函数出错。因为gbk范围比gb3212范围广,又因为这两种格式的编码相同只是范围不同而已,故采用大范围的gbk来定义字符串能够包含比较多的字符,因此转化成功!
Notice: iconv() [function.iconv]: Detected an illegal character in input string in a.php on line 796
出错的语句如下:
iconv("GB2312","UTF-8",$a);
解决办法,将GB2312更改为GBK即可搞定:
iconv("GBK","UTF-8",$a);
出现这个错误的原因是字符串$a中出现了超出gb2312范围的字符,所以iconv函数出错。因为gbk范围比gb3212范围广,又因为这两种格式的编码相同只是范围不同而已,故采用大范围的gbk来定义字符串能够包含比较多的字符,因此转化成功!
- iconv() [function.iconv]: detected an illegal character in input string
- iconv() : Detected an illegal character in input string
- iconv() Detected an illegal character in input string
- php iconv() : Detected an illegal character in input string
- PHP的iconv()函数遇到的错误: Detected an illegal character in input string ...
- mysql phpMyAdmin 导入报错iconv(): Detected an illegal character in input string原因解析
- PHP错误:iconv() Detected an illegal character
- php iconv() 编码转换出错 Detected an illegal character
- php iconv() 编码转换出错 Detected an illegal character
- PHP 读取EXCEL文件出现:Detected illegal character in input string解决
- Notice: iconv() [function.iconv]: Detected an illegal ..问题
- Notice: iconv() [function.iconv]: Detected an illegal ..问题
- Reverse an input character string
- iconv: illegal input sequence at position 14876089
- URLDecoder: Illegal hex characters in escape (%) pattern - For input string:
- JNI DETECTED ERROR IN APPLICATION: input is not valid Modified UTF-8: illegal continuation byte 0x12
- JNI DETECTED ERROR IN APPLICATION: input is not valid Modified UTF-8: illegal continuation byte 0x3f
- Illegal character in authority at index 18:
- 冒泡排序Bubble sort
- Linux find和grep的区别
- c语言线性表详解
- C语言中字符替换为字符串(增强版)
- B-树 与 B+树
- iconv() Detected an illegal character in input string
- C++类模版详解
- CentOS 6.3初次安装网络配置
- MySQL的登陆错误:ERROR 1049 (42000): Unknown database 'yht'
- body标签主要的属性
- B树、B-树、B+树、B*树
- Opengles之glRotatef()函数理解
- Xcode SVN Error: Attempted to lock an already-locked dir, How to solve?
- POJ--3349