Today I encountered the problem of Chinesegarbled characters while learningHTML5:
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:
But I tried to change
to the following
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!