Home >Backend Development >PHP Tutorial >Exchange GB2312 and UTF-8 in PHP_PHP Tutorial

Exchange GB2312 and UTF-8 in PHP_PHP Tutorial

WBOY
WBOYOriginal
2016-07-13 17:32:14866browse

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)

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/508713.htmlTechArticleBecause the certificate contains Chinese, GB2312 and UTF need to be processed in PHP (as the current mainstream development language) -8 swap. I searched online for relevant information in this area and found that it requires PHP (as...
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn