UTF-8, Unicode standardization form, BOM

Source: Internet
Author: User

Questions mentioned in "Test on creating UTF-8 coding web pages with Dreamweaver"
Http://www.cnbruce.com/blog/showlog.asp? Cat_id = 27 & log_id = 999

Q: Check "include Unicode signature (BOM )"

For more information, see the following help document:

To set document encoding, use the "default encoding" pop-up menu.

The "default encoding" specifies the encoding used to create a new page and the encoding used to open a document without specifying any encoding. For more information, see document encoding.

If Unicode (UTF-8) is selected as document encoding, entity encoding is not required because the UTF-8 can safely represent all characters. If you select another document encoding, you may need to use entity encoding to represent some characters. For more information about character entities, see http://www.w3.org/TR/REC-html40/sgml/entities.html.

If you select Unicode (UTF-8) as the default encoding, select a Unicode standardization form.

There are four Unicode standardization forms. The most important thing is to standardize Form C, because it is the most common form for the character model of the World Wide Web. Macromedia provides three other Unicode standardized forms as a supplement.

In Unicode, some characters look very similar, but different methods can be stored in the document. For example, "" (e-variant) can be expressed as a single character "e-variant", or two characters "normal Latin e" + "combination of variant notes ". Unicode composite characters are used in combination with the previous character, so the variant notes are displayed above "Latin e. Both forms are displayed as the same print style, but each form stored in the file is different.

Standardization is the process of ensuring that all characters stored in different forms are saved in the same form. That is, all the "" characters in the document are saved as a single "e change Note" or "e" + "Combination change Note", rather than in a document.

For more information about Unicode standardization and specific forms that can be used, see the Unicode Web site, which is a http://www.unicode.org/reports/tr15.

If you select Unicode (UTF-8) as the default encoding, you can select the include Unicode signature (BOM) option to include the bytecode mark (BOM) in the document ).

BOM is two to four bytes at the beginning of a text file. It can identify the file as Unicode and the byte sequence of the subsequent bytes. Because the UTF-8 does not have a byte order, you can choose to add a UTF-8 BOM. This is required for UTF-16 and UTF-32.

I have paid special attention to the two documents with the same code content. The BOM document byte is 3 more bytes than the unused document byte.

I am not very careful about the problem I encountered in Dreamweaver...Copy codeThe Code is as follows: the default open tool for txt files is nodepad. After saving it as UTF-8, this notepad tool forcibly adds the file UTF-8 bom to the file header. It will damage the original content of the file. If all the content of your file is ascii, you do not have to save it as UTF-8 because UTF-8 encoding includes ascii. Even if you want to save it as UTF-8, you need to save it as a non-bom format, which can be done with UE 11.0.

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.