Recently in a thief program, you need to use the ICONV function to crawl the UTF-8 encoded page into gb2312,
found that only using the ICONV function to fetch the data of a transcoding data will be less for no reason.
Let me depressed for a while, go online a check information to know this is a iconv function of a bug. Iconv error when converting character "-" to gb2312 phperz.com
The workaround is simply to add "//ignore" to the second parameter of the ICONV function after the code that needs to be converted.
The following is the referenced content:
Iconv ("UTF-8", "Gb2312//ignore", $data)
Ignore means ignoring errors at the time of conversion, and if there is no ignore argument, all strings after that character cannot be saved.
http://www.bkjia.com/PHPjc/486452.html www.bkjia.com true http://www.bkjia.com/PHPjc/486452.html techarticle recently in a thief program, need to use the ICONV function to fetch the UTF-8 encoded page into gb2312, found that only with the ICONV function to fetch the data of a transcoding data will be no ...