Home >Backend Development >PHP Tutorial >PHP mb_convert_encoding problem record
I recently discovered a problem. When using the mb_convert_encoding function to transcode, some special symbols (???) were removed and replaced with question marks.
Then try to replace first and then transcode.
The code is as follows
<code><span>$arr</span> = <span>array</span>( chr(<span>0x99</span>) => <span>'™'</span>, <span>//转gbk小心</span> chr(<span>0xA9</span>) => <span>'©'</span>, chr(<span>0xAE</span>) => <span>'®'</span>, ); mb_convert_encoding(strtr(<span>$str</span>,<span>$arr</span>),<span>'gbk'</span>,<span>'utf-8'</span>); </code>
But there is still a problem, the main problem still lies in this product.
PS:
temporarily recorded
The above introduces the PHP mb_convert_encoding problem record, including the relevant content. I hope it will be helpful to friends who are interested in PHP tutorials.