Home > Article > Backend Development > iconv() [function.iconv]: Detected an illegal character in_PHP教程
This article will introduce to you several solutions to the iconv() [function.iconv]: Detected an illegal character in error. Friends who need to know more can refer to it.
When using the iconv function to convert gb2312 to utf-8, why are there problems with some Chinese characters? Characters like "??quot; will be prompted as follows:
Notice: iconv() [function.iconv]: Detected an illegal character in input string
Solution:
The code is as follows
|
Copy code
|
||||||||
iconv('UTF-8', 'GB2312//IGNORE', '??') iconv('UTF-8', 'GBK', '??')
Make a GBK To UTF-8
| Php code
The code is as follows |