Home >Backend Development >PHP Tutorial >Solve the problem of Chinese garbled characters in IOS browser

Solve the problem of Chinese garbled characters in IOS browser

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-07-29 08:52:012241browse

I am currently working on a WeChat web application. The web page is in Chinese and encoded in UTF-8. It works fine on Android phones, but strange garbled characters appear on iPhones. The system is Ubuntu 14.04 LTS, PHP + APACHE

After checking the information from various sources, I found that the document encoding is different from the system encoding, or the encoding is not declared in the web page file, which will cause this problem.

After checking the encoding environment in the system through cat /etc/default/locale, we found that the system encoding is UTF8, and there is no problem.

Add
<meta http-equiv="content-Type" c />
Afterwards, the iPhone display is still garbled.

Finally, I read some posts and found that adding header("Content-type: text/html; charset=utf-8"); to the PHP file can solve this problem. I tried it and it worked.

Although I don’t know the reason yet, friends who also encounter this problem can also try it.

').addClass('pre-numbering').hide(); $(this).addClass('has-numbering').parent().append($numbering); for (i = 1; i ').text(i)); }; $numbering.fadeIn(1700); }); });

The above introduces how to solve the problem of Chinese garbled characters in IOS browsers, including IOS and browser content. I hope it will be helpful to friends who are interested in PHP tutorials.

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