" before the head; 2. Modify the encoding of the file itself to UTF8; 3. Modify the database connection encoding is UTF8.">
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.
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
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!