Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

Why does notepad not match lf character in unix document?


Asked by Addyson Leblanc on Dec 14, 2021 UNIX Getting started



That's because Notepad expects CRLF data, and the Unix document doesn't have the character. There are applications that will convert this for you on a standard *nix distro (dos2unix and unix2dos)
One may also ask,
Note: It is also known as Control+M character and may be seen as ^M Line Feed (LF): Also known as Newline Character or End Of Line Character (EOF) or line break. It is a special character used to signify the end of a line of text and the start of a new line in a file.
Indeed, That's because Notepad has traditionally only understood Windows line endings. Windows, Unix, and "classic" MacOS all use different conventions for indicating the end of a line of text.
And,
Using Notepad++ to change end of line characters (CRLF to LF) End of Line characters include CR or LF. Windows uses both CRLF at the end of a line, whereas Unix uses only a LF. CR = Carriage Return
Next,
Previously, Windows Notepad only supported Windows End of Line Characters — a Carriage Return (CR) and Line Feed (LF). Unix text documents use LF for line endings, and Macs use CR for line endings.