Home > Article > Backend Development > Exchange GB2312 and UTF-8 in PHP_PHP Tutorial
Because there is Chinese in the certificate, the exchange between GB2312 and UTF-8 needs to be done in php(as the current mainstream development language).
I searched for relevant information in this area online, and it said that it requires the support of php(as the current mainstream development language)_iconv.dll, but I am using php(as the current mainstream development language) Language)5 This file cannot be found at all in the folder, but the strange thing is that it is in php(as the current mainstream development language)4, and then I will php( As the current mainstream development language) php in 4 (as the current mainstream development language) _iconv.dll file, copied to system32, but an error occurred, I think it should not work , after all, the files in php(as the current mainstream development language)4 and php(as the current mainstream development language)5 should be incompatible. At this point I want to delete php(as the current mainstream development language)5 and install a php(as the current mainstream development language)4 Forget it, and later I found a paragraph Words: iconv and libxml(standardization is getting closer) are compiled into php(as the current mainstream development language)5ts.dll so you dont need the dlls in version 5 .So just convert as follows:
GB2312 -- UTF-8
iconv("GB2312","UTF-8",$text)
UTF-8 -- GB2312
iconv("UTF- 8","GB2312",$text)