回复 1# lion991128
Windows 下文本编辑默认会用 CR LF 对作为行结束符, 但有些编辑器能选择其他行结束符, 如 Notepad++
Unix 及 类 Unix 系统 (包括Linux) 文本编辑默认会用 LF 对作为行结束符
参考: https://en.wikipedia.org/wiki/Newline- LF: Unix and Unix-like systems (Linux, OS X, FreeBSD, Multics, AIX, Xenix, etc.), BeOS, Amiga, RISC OS, and others[1]
- CR+LF: Microsoft Windows, DOS (MS-DOS, PC DOS, etc.), DEC TOPS-10, RT-11, CP/M, MP/M, Atari TOS, OS/2, Symbian OS, Palm OS, Amstrad CPC, and most other early non-Unix and non-IBM OSes
- CR: Commodore 8-bit machines, Acorn BBC, ZX Spectrum, TRS-80, Apple II family, Oberon, the classic Mac OS up to version 9, MIT Lisp Machine and OS-9
- RS: QNX pre-POSIX implementation
- 0x9B: Atari 8-bit machines using ATASCII variant of ASCII (155 in decimal)
- LF+CR: Acorn BBC and RISC OS spooled text output.
复制代码
|