3 ms·
CR/LF always struck me as the logical choice. And according to the SO link posted by 'chadcmulligan, it turns out that pure LF separator is actually a Unix hack
by TeMPOraL 10y ago
CR/LF always struck me as the logical choice. And according to the SO link posted by 'chadcmulligan, it turns out that pure LF separator is actually a Unix hack that somehow got later accepted as the Right Way...
- aap_ 10y agoIt is the right way. Different terminals require different line endings and abstracting that to a single new line character makes sense. The UNIX tty driver then translates that new line character to what is appropriate to start a new line on a given terminal. In most cases CRLF is enough but older devices also needed additional delays.
- tzs 10y agoIf you are going with the abstract and translate approach, wouldn't the right way be to abstract to RS?
- kps 10y agoIt wasn't a Unix invention; see https://en.wikipedia.org/wiki/Newline#History https://en.wikipedia.org/wiki/Newline#History (as posted by randcraw nearby); for confirmation of the story there, see the Euro version of the standard for free at https://www.ecma-international.org/publications/standards/Ecma-006-arch.htm https://www.ecma-international.org/publications/standards/Ec...