Text document under Problem-windows two-character solution and precautionary approach when viewing Linux

Source: Internet
Author: User
Problem description

SQL INSERT statement, when Windows uploads to the server, using the Heat command to see the beginning of the file is two characters, using vim to edit the normal;

Workaround:

dos2unix filename       #filename为sql文件名 dos2unix命令说明:dos2unix命令用来将DOS格式的文本文件转换成UNIX格式的;
How to prevent similar problems from occurring in the future

Uploading files on Windows needs to be noted that the document needs to be saved as Utf-8 no BOM mode, the following is the use of "notepad++" to implement the Utf-8 no BOM formatting method;

This will reduce the occurrence of similar problems when Windows uploads files to the server.

Text document under Problem-windows two-character solution and precautionary approach when viewing Linux

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.