iconv arguments detailed

Detailed parameters:

 

$row [] = iconv('utf-8', 'GB2312//IGNORE', $value['message']);

 

iconv ( string $in_charset , string $out_charset , string $str ); 

  • If you add a string // TRANSLIT after out_charset, will enable transliteration (transliteration) function. This means that when a character can not be represented by a target character set, it can be approximately expressed by the shape of one or more characters.
  • If you add the string // IGNORE, characters can not express the target character set will be silently discarded.
  • If no added later out_charset string starts from the first truncated unrecognizable character, and generate a E_NOTICE. Thus the contents were discarded behind.

Guess you like

Origin www.cnblogs.com/jiaoaozuoziji/p/11635209.html