Damn the BOM of the UTF-8

Source: Internet
Author: User

First, describe what is Bom:

Bom: byte order mark
UTF-8 Bom is also called the UTF-8 signature, in fact, the BOM of the UTF-8 has no effect on the UFT-8, is to support the UTF-16, the BOM is added to the UTF-32, the BOM signature is to tell the editor of the current file using what encoding, it is easy for the editor to identify, but Bom is not displayed in the editor, but it will generate output, just like an empty line.

When I compile an arm assembler, errors such as error: Bad instruction ''always occur. After careful analysis, I found that the Code has no problems and should be encoded, because I usually used to save all files as UTF-8 format to facilitate viewing between Windows and Linux, did not take into account the BOM problem, after the UE multiple times to replace the Save format, it is found that the use of UTF-8 without BOM can make the compilation smoothly through, which found that the BOM of UTF-8 is useless to arm assembly, so usually use UTF-8 without BOM format.

After the network search answer, there are a lot of questions about saving PHP files to use the UTF-8 without BOM format, otherwise there will be a lot of inexplicable problems, it seems that the file format is very important.

During the cross-Compilation of arm assembly, I also encountered a warning of "Warning: No newline at end of File". Just add a new line at the end of the file. The answer to the question after searching is that the carriage return line break of the UNIX document is a character \ n, and two \ n \ r for Windows respectively, so the last character you edit in Windows is \ r not \ n, so the compiler thinks there is an error.

Supplement: just wrote a registry file, found that the system prompts can not add a binary registry, found that the original encoding in the strange, usually the content is UTF-8, here the system registry cannot recognize, save it as ANSI format to re-import the registry !!

In addition, to enable DOS in the current directory, win7 saves the hassle of entering commands in the current directory under DOS. Method 1: press shift and right-click the current directory, click "Open command window here" to enter the DOS directory. Method 2: Save the following content as a *. reg registry file and double-click it to import it to the system. Note that the Save format is ANSI !!

1 Windows Registry Editor Version 5.002 3 [hkey_classes_root \ Folder \ shell \ open_dos_box] 4 @ = "[enter dos Directory]" 5 6 [hkey_classes_root \ Folder \ shell \ open_dos_box \ command] 7 @ = "cmd.exe/S/K pushd \" % V \""

 

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.