Home > Backend Development > PHP Tutorial > PHP utf8 half garbled problem

PHP utf8 half garbled problem

WBOY
Release: 2016-07-25 08:51:58
Original
1200 people have browsed it
PHP utf8 half garbled problem

A bug appeared on the website. Garbled characters appeared in the header of the page, but other parts were normal. The header included a head.php, and the entire page was in utf8. But I opened head.php and saw that it was saved in utf8. Copying other normal files and filling in the contents of head.php still doesn't work. Finally, I used linux and vi to create a head.php. I entered the word test and found that the display was normal. So I downloaded head.php, opened it with ue32, and filled in the content. The result page displayed normally. It is probably a problem with the utf8 file header: This normal file does not have EFBB for utf8.

Normal: PHP utf8 half garbled problem

Exception: PHP utf8 half garbled problem



Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template