Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Newline
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== History == In the mid-1800s, long before the advent of [[teleprinter]]s and teletype machines, [[Morse code]] operators or [[telegraphist]]s invented and used [[Prosigns for Morse code|Morse code prosigns]] to encode white space text formatting in formal written text messages. In particular, the [[International Morse code|Morse]] prosign '''{{overline|BT}}''' (mnemonic break text), represented by the concatenation of literal textual Morse codes "B" and "T" characters, sent without the normal inter-character spacing, is used in Morse code to encode and indicate a ''new line'' or ''new section'' in a formal text message.<!-- two "A" codes {{overline|AA}} are dubious: They have /always/ been used in "Continental Morse" to represent the character '''Ä''' (which use came before International Morse). Their use in the middle 1900s appears to be unique to [[ARRL]] coding. --> Later, in the age of modern [[teleprinter]]s, standardized character set control codes were developed to aid in white space text formatting. ASCII was developed simultaneously by the [[International Organization for Standardization]] (ISO) and the American Standards Association (ASA), the latter being the predecessor organization to [[American National Standards Institute]] (ANSI). During the period of 1963 to 1968, the ISO draft standards supported the use of either [[#Representation|{{mono|CR}}+{{mono|LF}}]] or [[#Representation|{{mono|LF}}]] alone as a newline, while the ASA drafts supported only {{mono|CR}}+{{mono|LF}}. The sequence {{mono|CR}}+{{mono|LF}} was commonly used on many early computer systems that had adopted [[Teletype Corporation|Teletype]] machines—typically a [[Teletype Model 33]] ASR—as a console device, because this sequence was required to position those printers at the start of a new line. The separation of newline into two functions concealed the fact that the print head could not return from the far right to the beginning of the next line in time to print the next character. Any character printed after a {{mono|CR}} would often print as a smudge in the middle of the page while the print head was still moving the carriage back to the first position. "The solution was to make the newline two characters: {{mono|CR}} to move the carriage to column one, and {{mono|LF}} to move the paper up."<ref>{{cite book |last=Qualline |first=Steve |title=Vi Improved - Vim |year=2001 <!-- PDF date=1 August 2002 -->|publisher=[[Sams Publishing]] |isbn=9780735710016 |page=[http://ftp.vim.org/pub/vim/doc/book/vimbook-OPL.pdf#page=120 120] |url=http://ftp.vim.org/pub/vim/doc/book/vimbook-OPL.pdf |access-date=4 January 2023 |archive-date=8 April 2022 |archive-url=https://web.archive.org/web/20220408110814/http://ftp.vim.org/pub/vim/doc/book/vimbook-OPL.pdf}}</ref> In fact, it was often necessary to send [[Output padding|extra padding characters]]—extraneous CRs or NULs—which are ignored but give the print head time to move to the left margin. Many early video displays also required multiple character times to [[Scrolling|scroll]] the display. On such systems, applications had to talk directly to the Teletype machine and follow its conventions since the concept of [[device driver]]s hiding such hardware details from the application was not yet well developed. Therefore, text was routinely composed to satisfy the needs of Teletype machines. Most minicomputer systems from [[Digital Equipment Corporation|DEC]] used this convention. [[CP/M]] also used it in order to print on the same terminals that minicomputers used. From there [[MS-DOS]] (1981) adopted [[CP/M]]'s {{mono|CR}}+{{mono|LF}} in order to be compatible, and this convention was inherited by Microsoft's later [[Microsoft Windows|Windows]] operating system. The [[Multics]] operating system began development in 1964 and used {{mono|LF}} alone as its newline. Multics used a device driver to translate this character to whatever sequence a printer needed (including extra [[Output padding|padding characters]]), and the single byte was more convenient for programming. What seems like a more obvious choice – <!-- WP:SKYBLUE --> {{mono|CR}} – was not used, as {{mono|CR}} provided the useful function of overprinting one line with another to create [[Emphasis (typography)|boldface]], [[underscore]] and [[strikethrough]] effects. Perhaps more importantly, the use of {{mono|LF}} alone as a line terminator had already been incorporated into drafts of the eventual [[ISO/IEC 646]] standard. [[Unix]] followed the Multics practice, and later [[Unix-like]] systems followed Unix. This created conflicts between Windows and Unix-like [[operating system]]s, whereby files composed on one operating system could not be properly formatted or interpreted by another operating system (for example a [[UNIX shell script]] written in a Windows text editor like [[Microsoft Notepad|Notepad]]<ref>{{Cite news |title=Windows Notepad finally understands everyone else's end of line characters |url=https://www.zdnet.com/article/windows-notepad-finally-understands-everyone-elses-end-of-line-characters/ |access-date=4 January 2023 |publisher=[[ZDNet]] |language=en|last=Duckett|first=Chris |quote=[A]fter decades of frustration, and having to download a real text editor to change a single line in a config file from a Linux box, Microsoft has updated Notepad to be able to handle end of line characters used in Unix, Linux, and macOS environments.|archive-url=https://web.archive.org/web/20180513055845/https://www.zdnet.com/article/windows-notepad-finally-understands-everyone-elses-end-of-line-characters/|archive-date=13 May 2018}}</ref><ref>{{Cite web |last=Lopez |first=Michel |date=8 May 2018 |title=Introducing extended line endings support in Notepad |url=https://devblogs.microsoft.com/commandline/extended-eol-in-notepad/ |access-date=4 January 2023 |website=Windows Command Line |language=en-US|quote=As with any change to a long-established tool, there’s a chance that this new behavior may not work for your scenarios, or you may prefer to disable this new behavior and return to Notepad’s original behavior. To do this, you can change [...registry keys...] to tweak how Notepad handles pasting of text, and which EOL character to use when Enter/Return is hit|archive-url=https://web.archive.org/web/20190406132933/https://devblogs.microsoft.com/commandline/extended-eol-in-notepad/|archive-date=6 April 2019}}</ref>).
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)