Welcome to Delicate template
Header
Just another WordPress site
Header

iconv函数特殊符号转换不了

2月 25th, 2014 | Posted by 无 名 in php

php使用iconv进行编码转换时,中文字符的一些特殊符号转换不了,会导致后面的内容终止转换,那怎么处理呢
用//IGNORE就可以了。
比如:

$data[$key][$ck]=iconv("UTF-8", "GB2312//IGNORE", $cv);

这样就可以忽略转换不了的字符,而进行下去。

You can follow any responses to this entry through the RSS 2.0 Both comments and pings are currently closed.