UTF-8 and GB2312 webpage coding _ HTML/Xhtml _ webpage making
Source: Internet
Author: User
Recently, many students asked me about the coding of the webpage. What is the difference between gb2312 and UTF-8 encoding? Summary today. Recently, many students asked me about the coding of the webpage. What is the difference between gb2312 and UTF-8 encoding? Summary today: I don't know if we will encounter style definitions when making pages. Recently, many students asked me about webpage encoding. What is the difference between gb2312 and UTF-8 encoding? Summary today.
Recently, many students asked me about the coding of the webpage. What is the difference between gb2312 and UTF-8 encoding? Summary today:
I don't know if the style definition does not take effect when you create a page. The basic performance is that the style is not displayed or only some browsers are normal. In this case, we usually need to perform the following steps:
Check whether the modified style file is the style file of the current page (multiple environments)
Check whether the path in the file is correct (You may accidentally write more or less)
If the above two points confirm that there is no problem or only a part of the style is invalid, it can basically be determined that it is a file encoding problem.
We all know that the use of "UTF-8" is better than the "GB2312" cross-platform compatibility, but do not necessarily know that the file encoding and file encoding statement is not the same thing, I thought that the encoding type of the file is changed as long as the encoding type of the file is affirmed. As a result, the encoding type of the file is simply affirmed, but the file encoding type is not modified, when the browser parses a file based on the declarative encoding type, the parsing is incorrect because the actual encoding of the file is different from the declarative encoding.
How can the above problems be solved? Only the declaration is modified, and the file encoding type corresponding to the declaration is not saved.
When copying different files, the encoding of the two files is different.
As long as you save another copy of the above problem, you can choose the same encoding type as the declaration.
If the above method does not work, it may be about editing the software. We recommend you try another editor.
The editor that I know is problematic:
EmEditor Professional v7.50 Alpha 5 (may still be an Alpha relationship, if a particular Chinese character appears at the end of the style comment when the UTF-8 is not signed, such as "no, use, answer, name, near, view, Ghost, comment, argument, out, write, bottom, present, face, Day", etc, the later content cannot be parsed by IE7)
Editplus (I don't know which version it is, someone knows please tell me that when saving the UTF-8 and adding a signature, the signature will cause the content to be parsed)
Note: All of the above refer to the style section, including the style and independent style files on the page.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.