" before the head; 2. Modify the encoding of the file itself to UTF8; 3. Modify the database connection encoding is UTF8."> What to do if the html title is garbled-Front-end Q&A-php.cn

What to do if the html title is garbled

藏色散人
Release: 2023-01-06 11:16:18
Original
5662 people have browsed it

html The solution to the garbled title: 1. Add " before the head; 2. Modify the encoding of the file itself to UTF8; 3. Modify the database connection encoding to UTF8.

What to do if the html title is garbled

The operating environment of this article: Windows 7 system, HTML5 version, Dell G3 computer.

html Solution to the garbled title problem in web pages

1. Statement problem

Put the following sentence between the heads, and the title should be placed below this sentence

Copy after login

Must be utf-8. If you accidentally write it as utf8, it will be fine in Safari, but it will still be garbled in IE

2. The encoding problem of the file itself

Edit the web page file with text Open the browser, right-click and save as, select the encoding format as UTF-8

3. Database connection encoding problem

If the web page setting encoding is gbk, and the database storage data encoding format is UTF-8 Yes, at this time, the program can query the database data and perform program transcoding before displaying the data.

[Recommended learning:html video tutorial]

The above is the detailed content of What to do if the html title is garbled. For more information, please follow other related articles on the PHP Chinese website!

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
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!