Home >Backend Development >PHP Problem >How to convert PHP utf8 to Chinese
How to convert utf8 to Chinese: first decode the encoded URL string through the "urldecode" function; then use the "mb_convert_encoding" function to convert the character encoding; and finally output the conversion result.
Specific question:
To convert a specified set of UTF-8 encoded Chinese characters into normal Simplified Chinese
I tried the mb_convert_encoding function, but it didn’t work. The string I want to convert is encoded in this way. I don’t know if this is UTF-8 encoding
Jilin
Use other tools to transfer this set of codes. The tool shows "Jilin"?
Solution:
<? $a=urldecode("%E5%90%89%E6%9E%97"); $a=mb_convert_encoding($a, 'GB2312', 'UTF-8'); echo $a; ?>
For a lot of related knowledge, please visit PHP Chinese website!
The above is the detailed content of How to convert PHP utf8 to Chinese. For more information, please follow other related articles on the PHP Chinese website!