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.