Malformed UTF-8 characters, possibly incorrectly encoded 或中文乱码 (Uncaught InvalidArgumentException: Malformed UTF-8 characters, possibly incorrectly encoded in)

问题: Uncaught InvalidArgumentException: Malformed UTF-8 characters, possibly incorrectly encoded in

 

The data returned is of special characters, encoding conversion back just fine

mb_convert_encoding($value, 'UTF-8', 'UTF-8');

 

Chinese distortion can be transcoded by the following method

$content = mb_convert_encoding( $result, 'UTF-8', 'UTF-8,GBK,GB2312,BIG5' );

Means that the UTF-8, GBK, GB2312, BIG5 encoding these types transformed into UTF-8 encoding.

 

 

Guess you like

Origin www.cnblogs.com/yehuisir/p/11909427.html