Windows为什么使用CR LF? [英] Why does Windows use CR LF?

查看:221
本文介绍了Windows为什么使用CR LF?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我了解两者之间的区别,因此无需赘述,但我只是想知道Windows为什么同时使用CR和LF来指示换行的背后原因是什么.看来Linux方法(仅使用LF)更有意义,节省空间并且更易于解析.

I understand the difference between the two so there's no need to go into that, but I'm just wondering what the reasoning is behind why Windows uses both CR and LF to indicate a line break. It seems like the Linux method (just using LF) makes a lot more sense, saves space, and is easier to parse.

推荐答案

从历史上看,当使用点矩阵打印机 teletypes CR时,笔架会返回到LF将馈入下一行.在文件本身中使用CR + LF可以将文件直接发送到打印机,而无需任何类型的打印机驱动程序.

Historically when using dot-matrix printers teletypes CR would return the carriage to the first position of the line while LF would feed to the next line. Using CR+LF in the file themselves made it possible to send a file directly to the printer, without any kind of printer driver.

感谢@zaph指出这是电传打字机,而不是点阵打印机

这篇关于Windows为什么使用CR LF?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆