Chinese garbled characters problem

大家讲道理
Release: 2017-05-28 10:43:26
Original
4397 people have browsed it

Today I encountered the problem of Chinesegarbled characters while learningHTML5:


 
请输入内容:
Copy after login


I developed it using myeclipse2016, but the encoding format of my project and html file are both utf-8, which is still garbled. I searched online. I couldn't find it in the search, but later I found an interesting thing and learned the cause of the problem.

Every time you create a new HTML5 file, the new file comes with the following code:


  
Copy after login


But I tried to change


Copy after login


to the following


Copy after login


The problem of garbled characters is solved.

Then I went to google to find out the difference between http-equiv and name:

They said this: "nameattributeis mainly used to describe web pages", while http -equiv "is equivalent to the http file header. It can return some useful information to the browser to help display the web page content correctly and accurately."

After seeing this, I think it can be roughly explained, It’s just that you may need to change it every time in future development (I tried deleting all these meta attributes, but when the project was run, the Chinese characters were still garbled...).

The above is the detailed content of Chinese garbled characters problem. 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!