CR LF means "Carriage Return, Line Feed" - it's a DOS hangover from the olden days from when some devices required a Carriage Return, and some devices required a Line Feed to get a new line, so Microsoft decided to just make a new-line have both characters, so that they would output correctly on all devices.
Windows programs expect their newline format in CRLF (\r\n). *nix expect just LF data (\n). If you open a Unix text document in Notepad on windows, you'll notice that all of the line breaks dissapear and the entire document is on one line. That's because Notepad expects CRLF data, and the Unix document doesn't have the \r character.
There are applications that will convert this for you on a standard *nix distro (dos2unix and unix2dos)
本文解释了CRLF(回车换行)与LF(换行)的区别,这是两种不同的换行符标准。CRLF主要用于Windows系统中,而LF则常见于Unix及类Unix系统。文章还介绍了当使用不匹配的换行符时可能遇到的问题,并提到了用于转换文件格式的工具。
7157

被折叠的 条评论
为什么被折叠?



