Carriage return wrap problem in Notepad

Source: Internet
Author: User

We know that carriage return linefeed is not the same in different systems, such as 0d 0a under Dos/windows, 0a in Unix and 0d in Mac. For a variety of reasons, we may encounter some "special" carriage return lines, such as 0d 0d 0a. If Notepad opens a file that contains such a carriage return line, Notepad may delete the 0d 0d 0a when the user saves.

After my small range of testing (limited to XP and 2003), the probability of this bug is about 50%, that is, every two machines have a problem. This bug is not a problem for most people, after all, there is not much chance of encountering this "special" carriage return, and even if there is no effect. But for me it brought a little trouble.

For some reason, in some of my older SQL scripts there are a handful of such "special" carriage return lines. I am accustomed to using Notepad to edit the SQL script, under the "special care" of Notepad, My code has "unexpected" changes. For example, this script--comment
IF (@r > 0)
SET @t = NULL

After "special care" in Notepad, it becomes--note if (@r > 0)
SET @t = NULL

In the "culprit" diving time, SQL Server became my sucker, fortunately redressed eventually snow. Because of the legacy of history, replacing the 0d 0d 0a in all SQL scripts with 0d 0a is a pretty hassle, and my choice is to just give up using Notepad to edit the SQL script.

But believe that this problem is relatively rare (no way, I rp too good), the preparation of this article is purely narcissistic.

Related Article

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.