Home >Backend Development >PHP Tutorial >PHP function utf8 to gb2312 encoding_PHP tutorial

PHP function utf8 to gb2312 encoding_PHP tutorial

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-07-21 15:58:371059browse

Today, I was a little too low! After the conversion was successful, I could not see the characters, so I thought there was something wrong with the usage. When I checked the source file, I found that there were garbled characters in

and , causing the label to become: Ranqigutu?/title> ;, and all the content after <title> was pulled into <title>. I was still shouting in the group for a long time. I found out that this was the problem, and I was so angry! ! ! <br>Use ICONV function: <br>iconv( "UTF-8", "gb2312" , "abc sunshine 123"); <p>It is said that this is better and you can ignore the errors during conversion! <br>iconv( "UTF-8", "gb2312//IGNORE" , "abc sunshine 123");</p> <p align="left"></p> <div style="display:none;"> <span id="url" itemprop="url">http://www.bkjia.com/PHPjc/317577.html</span><span id="indexUrl" itemprop="indexUrl">www.bkjia.com</span><span id="isOriginal" itemprop="isOriginal">true</span><span id="isBasedOnUrl" itemprop="isBasedOnUrl">http: //www.bkjia.com/PHPjc/317577.html</span><span id="genre" itemprop="genre">TechArticle</span><span id="description" itemprop="description">Today, I am too low! After the conversion was successful, I couldn’t see the characters, so I thought there was something wrong with the usage. When I checked the source file, it turned out to be garbled characters in title and /title, causing the label to become: title garbled...</span> </div> <div class="art_confoot"></div>
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