Why does iconv convert unrecognized characters to 0 PHPcode & lt ;? Php $ str = & quot; 100 ㎡ & quot; $ content = iconv (& quot; gb2312 & quot;, & quot; UTF-8 // ignore & quot ;, $ str); echo $ conten why iconv converts unrecognized characters to 0
PHP code
It will output "1000 square meters". does ignore mean to ignore it? how can it be converted to 0?
If mb_convert_encoding () is used, "100? Area"
Is there a good solution?
------ Solution --------------------
Change gb2312 to gbk
------ Solution --------------------
Because gb2312 is a subset of gbk. Many special characters gb2312 are not supported. Gbk supports.
------ Solution --------------------
GBK is an extended version of gb2312. many gb2312 characters do not have the corresponding encoding.
It seems that GBK is php5 and gb2312 is php4, which is backward compatible and expanded.