CINXE.COM
Newline - Wikipedia
<!DOCTYPE html> <html class="client-nojs vector-feature-language-in-header-enabled vector-feature-language-in-main-page-header-disabled vector-feature-page-tools-pinned-disabled vector-feature-toc-pinned-clientpref-1 vector-feature-main-menu-pinned-disabled vector-feature-limited-width-clientpref-1 vector-feature-limited-width-content-enabled vector-feature-custom-font-size-clientpref-1 vector-feature-appearance-pinned-clientpref-1 vector-feature-night-mode-enabled skin-theme-clientpref-day vector-sticky-header-enabled vector-toc-available" lang="en" dir="ltr"> <head> <meta charset="UTF-8"> <title>Newline - Wikipedia</title> <script>(function(){var className="client-js vector-feature-language-in-header-enabled vector-feature-language-in-main-page-header-disabled vector-feature-page-tools-pinned-disabled vector-feature-toc-pinned-clientpref-1 vector-feature-main-menu-pinned-disabled vector-feature-limited-width-clientpref-1 vector-feature-limited-width-content-enabled vector-feature-custom-font-size-clientpref-1 vector-feature-appearance-pinned-clientpref-1 vector-feature-night-mode-enabled skin-theme-clientpref-day vector-sticky-header-enabled vector-toc-available";var cookie=document.cookie.match(/(?:^|; )enwikimwclientpreferences=([^;]+)/);if(cookie){cookie[1].split('%2C').forEach(function(pref){className=className.replace(new RegExp('(^| )'+pref.replace(/-clientpref-\w+$|[^\w-]+/g,'')+'-clientpref-\\w+( |$)'),'$1'+pref+'$2');});}document.documentElement.className=className;}());RLCONF={"wgBreakFrames":false,"wgSeparatorTransformTable":["",""],"wgDigitTransformTable":["",""],"wgDefaultDateFormat":"dmy","wgMonthNames":["","January","February","March","April","May","June","July","August","September","October","November","December"],"wgRequestId":"64f25c52-2814-43ba-aea1-c78e25981a30","wgCanonicalNamespace":"","wgCanonicalSpecialPageName":false,"wgNamespaceNumber":0,"wgPageName":"Newline","wgTitle":"Newline","wgCurRevisionId":1283173537,"wgRevisionId":1283173537,"wgArticleId":238775,"wgIsArticle":true,"wgIsRedirect":false,"wgAction":"view","wgUserName":null,"wgUserGroups":["*"],"wgCategories":["Articles with short description","Short description is different from Wikidata","Use dmy dates from November 2020","Articles needing additional references from February 2016","All articles needing additional references","Webarchive template wayback links","Articles with example C Sharp code","Articles with example Java code","Control characters","Whitespace","Programming language comparisons"],"wgPageViewLanguage":"en","wgPageContentLanguage":"en","wgPageContentModel":"wikitext","wgRelevantPageName":"Newline","wgRelevantArticleId":238775,"wgIsProbablyEditable":true,"wgRelevantPageIsProbablyEditable":true,"wgRestrictionEdit":[],"wgRestrictionMove":[],"wgNoticeProject":"wikipedia","wgCiteReferencePreviewsActive":false,"wgFlaggedRevsParams":{"tags":{"status":{"levels":1}}},"wgMediaViewerOnClick":true,"wgMediaViewerEnabledByDefault":true,"wgPopupsFlags":0,"wgVisualEditor":{"pageLanguageCode":"en","pageLanguageDir":"ltr","pageVariantFallbacks":"en"},"wgMFDisplayWikibaseDescriptions":{"search":true,"watchlist":true,"tagline":false,"nearby":true},"wgWMESchemaEditAttemptStepOversample":false,"wgWMEPageLength":40000,"wgEditSubmitButtonLabelPublish":true,"wgULSPosition":"interlanguage","wgULSisCompactLinksEnabled":false,"wgVector2022LanguageInHeader":true,"wgULSisLanguageSelectorEmpty":false,"wgWikibaseItemId":"Q184914","wgCheckUserClientHintsHeadersJsApi":["brands","architecture","bitness","fullVersionList","mobile","model","platform","platformVersion"],"GEHomepageSuggestedEditsEnableTopics":true,"wgGETopicsMatchModeEnabled":false,"wgGELevelingUpEnabledForUser":false}; RLSTATE={"ext.globalCssJs.user.styles":"ready","site.styles":"ready","user.styles":"ready","ext.globalCssJs.user":"ready","user":"ready","user.options":"loading","ext.cite.styles":"ready","ext.pygments":"ready","skins.vector.search.codex.styles":"ready","skins.vector.styles":"ready","skins.vector.icons":"ready","ext.wikimediamessages.styles":"ready","ext.visualEditor.desktopArticleTarget.noscript":"ready","ext.uls.interlanguage":"ready","wikibase.client.init":"ready"};RLPAGEMODULES=["ext.cite.ux-enhancements","ext.pygments.view","mediawiki.page.media","site","mediawiki.page.ready","mediawiki.toc","skins.vector.js","ext.centralNotice.geoIP","ext.centralNotice.startUp","ext.gadget.ReferenceTooltips","ext.gadget.switcher","ext.urlShortener.toolbar","ext.centralauth.centralautologin","mmv.bootstrap","ext.popups","ext.visualEditor.desktopArticleTarget.init","ext.visualEditor.targetLoader","ext.echo.centralauth","ext.eventLogging","ext.wikimediaEvents","ext.navigationTiming","ext.uls.interface","ext.cx.eventlogging.campaigns","ext.cx.uls.quick.actions","wikibase.client.vector-2022","ext.checkUser.clientHints","ext.quicksurveys.init","ext.growthExperiments.SuggestedEditSession"];</script> <script>(RLQ=window.RLQ||[]).push(function(){mw.loader.impl(function(){return["user.options@12s5i",function($,jQuery,require,module){mw.user.tokens.set({"patrolToken":"+\\","watchToken":"+\\","csrfToken":"+\\"}); }];});});</script> <link rel="stylesheet" href="/w/load.php?lang=en&modules=ext.cite.styles%7Cext.pygments%7Cext.uls.interlanguage%7Cext.visualEditor.desktopArticleTarget.noscript%7Cext.wikimediamessages.styles%7Cskins.vector.icons%2Cstyles%7Cskins.vector.search.codex.styles%7Cwikibase.client.init&only=styles&skin=vector-2022"> <script async="" src="/w/load.php?lang=en&modules=startup&only=scripts&raw=1&skin=vector-2022"></script> <meta name="ResourceLoaderDynamicStyles" content=""> <link rel="stylesheet" href="/w/load.php?lang=en&modules=site.styles&only=styles&skin=vector-2022"> <meta name="generator" content="MediaWiki 1.44.0-wmf.22"> <meta name="referrer" content="origin"> <meta name="referrer" content="origin-when-cross-origin"> <meta name="robots" content="max-image-preview:standard"> <meta name="format-detection" content="telephone=no"> <meta property="og:image" content="https://upload.wikimedia.org/wikipedia/commons/b/b3/Illustration_of_a_newline.png"> <meta property="og:image:width" content="1200"> <meta property="og:image:height" content="639"> <meta property="og:image" content="https://upload.wikimedia.org/wikipedia/commons/b/b3/Illustration_of_a_newline.png"> <meta property="og:image:width" content="800"> <meta property="og:image:height" content="426"> <meta property="og:image:width" content="640"> <meta property="og:image:height" content="341"> <meta name="viewport" content="width=1120"> <meta property="og:title" content="Newline - Wikipedia"> <meta property="og:type" content="website"> <link rel="preconnect" href="//upload.wikimedia.org"> <link rel="alternate" media="only screen and (max-width: 640px)" href="//en.m.wikipedia.org/wiki/Newline"> <link rel="alternate" type="application/x-wiki" title="Edit this page" href="/w/index.php?title=Newline&action=edit"> <link rel="apple-touch-icon" href="/static/apple-touch/wikipedia.png"> <link rel="icon" href="/static/favicon/wikipedia.ico"> <link rel="search" type="application/opensearchdescription+xml" href="/w/rest.php/v1/search" title="Wikipedia (en)"> <link rel="EditURI" type="application/rsd+xml" href="//en.wikipedia.org/w/api.php?action=rsd"> <link rel="canonical" href="https://en.wikipedia.org/wiki/Newline"> <link rel="license" href="https://creativecommons.org/licenses/by-sa/4.0/deed.en"> <link rel="alternate" type="application/atom+xml" title="Wikipedia Atom feed" href="/w/index.php?title=Special:RecentChanges&feed=atom"> <link rel="dns-prefetch" href="//meta.wikimedia.org" /> <link rel="dns-prefetch" href="login.wikimedia.org"> </head> <body class="skin--responsive skin-vector skin-vector-search-vue mediawiki ltr sitedir-ltr mw-hide-empty-elt ns-0 ns-subject mw-editable page-Newline rootpage-Newline skin-vector-2022 action-view"><a class="mw-jump-link" href="#bodyContent">Jump to content</a> <div class="vector-header-container"> <header class="vector-header mw-header"> <div class="vector-header-start"> <nav class="vector-main-menu-landmark" aria-label="Site"> <div id="vector-main-menu-dropdown" class="vector-dropdown vector-main-menu-dropdown vector-button-flush-left vector-button-flush-right" title="Main menu" > <input type="checkbox" id="vector-main-menu-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-main-menu-dropdown" class="vector-dropdown-checkbox " aria-label="Main menu" > <label id="vector-main-menu-dropdown-label" for="vector-main-menu-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only " aria-hidden="true" ><span class="vector-icon mw-ui-icon-menu mw-ui-icon-wikimedia-menu"></span> <span class="vector-dropdown-label-text">Main menu</span> </label> <div class="vector-dropdown-content"> <div id="vector-main-menu-unpinned-container" class="vector-unpinned-container"> <div id="vector-main-menu" class="vector-main-menu vector-pinnable-element"> <div class="vector-pinnable-header vector-main-menu-pinnable-header vector-pinnable-header-unpinned" data-feature-name="main-menu-pinned" data-pinnable-element-id="vector-main-menu" data-pinned-container-id="vector-main-menu-pinned-container" data-unpinned-container-id="vector-main-menu-unpinned-container" > <div class="vector-pinnable-header-label">Main menu</div> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-main-menu.pin">move to sidebar</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-main-menu.unpin">hide</button> </div> <div id="p-navigation" class="vector-menu mw-portlet mw-portlet-navigation" > <div class="vector-menu-heading"> Navigation </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="n-mainpage-description" class="mw-list-item"><a href="/wiki/Main_Page" title="Visit the main page [z]" accesskey="z"><span>Main page</span></a></li><li id="n-contents" class="mw-list-item"><a href="/wiki/Wikipedia:Contents" title="Guides to browsing Wikipedia"><span>Contents</span></a></li><li id="n-currentevents" class="mw-list-item"><a href="/wiki/Portal:Current_events" title="Articles related to current events"><span>Current events</span></a></li><li id="n-randompage" class="mw-list-item"><a href="/wiki/Special:Random" title="Visit a randomly selected article [x]" accesskey="x"><span>Random article</span></a></li><li id="n-aboutsite" class="mw-list-item"><a href="/wiki/Wikipedia:About" title="Learn about Wikipedia and how it works"><span>About Wikipedia</span></a></li><li id="n-contactpage" class="mw-list-item"><a href="//en.wikipedia.org/wiki/Wikipedia:Contact_us" title="How to contact Wikipedia"><span>Contact us</span></a></li> </ul> </div> </div> <div id="p-interaction" class="vector-menu mw-portlet mw-portlet-interaction" > <div class="vector-menu-heading"> Contribute </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="n-help" class="mw-list-item"><a href="/wiki/Help:Contents" title="Guidance on how to use and edit Wikipedia"><span>Help</span></a></li><li id="n-introduction" class="mw-list-item"><a href="/wiki/Help:Introduction" title="Learn how to edit Wikipedia"><span>Learn to edit</span></a></li><li id="n-portal" class="mw-list-item"><a href="/wiki/Wikipedia:Community_portal" title="The hub for editors"><span>Community portal</span></a></li><li id="n-recentchanges" class="mw-list-item"><a href="/wiki/Special:RecentChanges" title="A list of recent changes to Wikipedia [r]" accesskey="r"><span>Recent changes</span></a></li><li id="n-upload" class="mw-list-item"><a href="/wiki/Wikipedia:File_upload_wizard" title="Add images or other media for use on Wikipedia"><span>Upload file</span></a></li><li id="n-specialpages" class="mw-list-item"><a href="/wiki/Special:SpecialPages"><span>Special pages</span></a></li> </ul> </div> </div> </div> </div> </div> </div> </nav> <a href="/wiki/Main_Page" class="mw-logo"> <img class="mw-logo-icon" src="/static/images/icons/wikipedia.png" alt="" aria-hidden="true" height="50" width="50"> <span class="mw-logo-container skin-invert"> <img class="mw-logo-wordmark" alt="Wikipedia" src="/static/images/mobile/copyright/wikipedia-wordmark-en.svg" style="width: 7.5em; height: 1.125em;"> <img class="mw-logo-tagline" alt="The Free Encyclopedia" src="/static/images/mobile/copyright/wikipedia-tagline-en.svg" width="117" height="13" style="width: 7.3125em; height: 0.8125em;"> </span> </a> </div> <div class="vector-header-end"> <div id="p-search" role="search" class="vector-search-box-vue vector-search-box-collapses vector-search-box-show-thumbnail vector-search-box-auto-expand-width vector-search-box"> <a href="/wiki/Special:Search" class="cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only search-toggle" title="Search Wikipedia [f]" accesskey="f"><span class="vector-icon mw-ui-icon-search mw-ui-icon-wikimedia-search"></span> <span>Search</span> </a> <div class="vector-typeahead-search-container"> <div class="cdx-typeahead-search cdx-typeahead-search--show-thumbnail cdx-typeahead-search--auto-expand-width"> <form action="/w/index.php" id="searchform" class="cdx-search-input cdx-search-input--has-end-button"> <div id="simpleSearch" class="cdx-search-input__input-wrapper" data-search-loc="header-moved"> <div class="cdx-text-input cdx-text-input--has-start-icon"> <input class="cdx-text-input__input" type="search" name="search" placeholder="Search Wikipedia" aria-label="Search Wikipedia" autocapitalize="sentences" title="Search Wikipedia [f]" accesskey="f" id="searchInput" > <span class="cdx-text-input__icon cdx-text-input__start-icon"></span> </div> <input type="hidden" name="title" value="Special:Search"> </div> <button class="cdx-button cdx-search-input__end-button">Search</button> </form> </div> </div> </div> <nav class="vector-user-links vector-user-links-wide" aria-label="Personal tools"> <div class="vector-user-links-main"> <div id="p-vector-user-menu-preferences" class="vector-menu mw-portlet emptyPortlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> </div> </div> <div id="p-vector-user-menu-userpage" class="vector-menu mw-portlet emptyPortlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> </div> </div> <nav class="vector-appearance-landmark" aria-label="Appearance"> <div id="vector-appearance-dropdown" class="vector-dropdown " title="Change the appearance of the page's font size, width, and color" > <input type="checkbox" id="vector-appearance-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-appearance-dropdown" class="vector-dropdown-checkbox " aria-label="Appearance" > <label id="vector-appearance-dropdown-label" for="vector-appearance-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only " aria-hidden="true" ><span class="vector-icon mw-ui-icon-appearance mw-ui-icon-wikimedia-appearance"></span> <span class="vector-dropdown-label-text">Appearance</span> </label> <div class="vector-dropdown-content"> <div id="vector-appearance-unpinned-container" class="vector-unpinned-container"> </div> </div> </div> </nav> <div id="p-vector-user-menu-notifications" class="vector-menu mw-portlet emptyPortlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> </div> </div> <div id="p-vector-user-menu-overflow" class="vector-menu mw-portlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="pt-sitesupport-2" class="user-links-collapsible-item mw-list-item user-links-collapsible-item"><a data-mw="interface" href="https://donate.wikimedia.org/?wmf_source=donate&wmf_medium=sidebar&wmf_campaign=en.wikipedia.org&uselang=en" class=""><span>Donate</span></a> </li> <li id="pt-createaccount-2" class="user-links-collapsible-item mw-list-item user-links-collapsible-item"><a data-mw="interface" href="/w/index.php?title=Special:CreateAccount&returnto=Newline" title="You are encouraged to create an account and log in; however, it is not mandatory" class=""><span>Create account</span></a> </li> <li id="pt-login-2" class="user-links-collapsible-item mw-list-item user-links-collapsible-item"><a data-mw="interface" href="/w/index.php?title=Special:UserLogin&returnto=Newline" title="You're encouraged to log in; however, it's not mandatory. [o]" accesskey="o" class=""><span>Log in</span></a> </li> </ul> </div> </div> </div> <div id="vector-user-links-dropdown" class="vector-dropdown vector-user-menu vector-button-flush-right vector-user-menu-logged-out" title="Log in and more options" > <input type="checkbox" id="vector-user-links-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-user-links-dropdown" class="vector-dropdown-checkbox " aria-label="Personal tools" > <label id="vector-user-links-dropdown-label" for="vector-user-links-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only " aria-hidden="true" ><span class="vector-icon mw-ui-icon-ellipsis mw-ui-icon-wikimedia-ellipsis"></span> <span class="vector-dropdown-label-text">Personal tools</span> </label> <div class="vector-dropdown-content"> <div id="p-personal" class="vector-menu mw-portlet mw-portlet-personal user-links-collapsible-item" title="User menu" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="pt-sitesupport" class="user-links-collapsible-item mw-list-item"><a href="https://donate.wikimedia.org/?wmf_source=donate&wmf_medium=sidebar&wmf_campaign=en.wikipedia.org&uselang=en"><span>Donate</span></a></li><li id="pt-createaccount" class="user-links-collapsible-item mw-list-item"><a href="/w/index.php?title=Special:CreateAccount&returnto=Newline" title="You are encouraged to create an account and log in; however, it is not mandatory"><span class="vector-icon mw-ui-icon-userAdd mw-ui-icon-wikimedia-userAdd"></span> <span>Create account</span></a></li><li id="pt-login" class="user-links-collapsible-item mw-list-item"><a href="/w/index.php?title=Special:UserLogin&returnto=Newline" title="You're encouraged to log in; however, it's not mandatory. [o]" accesskey="o"><span class="vector-icon mw-ui-icon-logIn mw-ui-icon-wikimedia-logIn"></span> <span>Log in</span></a></li> </ul> </div> </div> <div id="p-user-menu-anon-editor" class="vector-menu mw-portlet mw-portlet-user-menu-anon-editor" > <div class="vector-menu-heading"> Pages for logged out editors <a href="/wiki/Help:Introduction" aria-label="Learn more about editing"><span>learn more</span></a> </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="pt-anoncontribs" class="mw-list-item"><a href="/wiki/Special:MyContributions" title="A list of edits made from this IP address [y]" accesskey="y"><span>Contributions</span></a></li><li id="pt-anontalk" class="mw-list-item"><a href="/wiki/Special:MyTalk" title="Discussion about edits from this IP address [n]" accesskey="n"><span>Talk</span></a></li> </ul> </div> </div> </div> </div> </nav> </div> </header> </div> <div class="mw-page-container"> <div class="mw-page-container-inner"> <div class="vector-sitenotice-container"> <div id="siteNotice"><!-- CentralNotice --></div> </div> <div class="vector-column-start"> <div class="vector-main-menu-container"> <div id="mw-navigation"> <nav id="mw-panel" class="vector-main-menu-landmark" aria-label="Site"> <div id="vector-main-menu-pinned-container" class="vector-pinned-container"> </div> </nav> </div> </div> <div class="vector-sticky-pinned-container"> <nav id="mw-panel-toc" aria-label="Contents" data-event-name="ui.sidebar-toc" class="mw-table-of-contents-container vector-toc-landmark"> <div id="vector-toc-pinned-container" class="vector-pinned-container"> <div id="vector-toc" class="vector-toc vector-pinnable-element"> <div class="vector-pinnable-header vector-toc-pinnable-header vector-pinnable-header-pinned" data-feature-name="toc-pinned" data-pinnable-element-id="vector-toc" > <h2 class="vector-pinnable-header-label">Contents</h2> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-toc.pin">move to sidebar</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-toc.unpin">hide</button> </div> <ul class="vector-toc-contents" id="mw-panel-toc-list"> <li id="toc-mw-content-text" class="vector-toc-list-item vector-toc-level-1"> <a href="#" class="vector-toc-link"> <div class="vector-toc-text">(Top)</div> </a> </li> <li id="toc-History" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#History"> <div class="vector-toc-text"> <span class="vector-toc-numb">1</span> <span>History</span> </div> </a> <ul id="toc-History-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Representation" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#Representation"> <div class="vector-toc-text"> <span class="vector-toc-numb">2</span> <span>Representation</span> </div> </a> <button aria-controls="toc-Representation-sublist" class="cdx-button cdx-button--weight-quiet cdx-button--icon-only vector-toc-toggle"> <span class="vector-icon mw-ui-icon-wikimedia-expand"></span> <span>Toggle Representation subsection</span> </button> <ul id="toc-Representation-sublist" class="vector-toc-list"> <li id="toc-Communication_protocols" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Communication_protocols"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.1</span> <span>Communication protocols</span> </div> </a> <ul id="toc-Communication_protocols-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Unicode" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Unicode"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.2</span> <span>Unicode</span> </div> </a> <ul id="toc-Unicode-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-In_programming_languages" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#In_programming_languages"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.3</span> <span>In programming languages</span> </div> </a> <ul id="toc-In_programming_languages-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Issues_with_different_newline_formats" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Issues_with_different_newline_formats"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.4</span> <span>Issues with different newline formats</span> </div> </a> <ul id="toc-Issues_with_different_newline_formats-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Conversion_between_newline_formats" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Conversion_between_newline_formats"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.5</span> <span>Conversion between newline formats</span> </div> </a> <ul id="toc-Conversion_between_newline_formats-sublist" class="vector-toc-list"> </ul> </li> </ul> </li> <li id="toc-Interpretation" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#Interpretation"> <div class="vector-toc-text"> <span class="vector-toc-numb">3</span> <span>Interpretation</span> </div> </a> <ul id="toc-Interpretation-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Reverse_and_partial_line_feeds" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#Reverse_and_partial_line_feeds"> <div class="vector-toc-text"> <span class="vector-toc-numb">4</span> <span>Reverse and partial line feeds</span> </div> </a> <ul id="toc-Reverse_and_partial_line_feeds-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-See_also" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#See_also"> <div class="vector-toc-text"> <span class="vector-toc-numb">5</span> <span>See also</span> </div> </a> <ul id="toc-See_also-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-References" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#References"> <div class="vector-toc-text"> <span class="vector-toc-numb">6</span> <span>References</span> </div> </a> <ul id="toc-References-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-External_links" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#External_links"> <div class="vector-toc-text"> <span class="vector-toc-numb">7</span> <span>External links</span> </div> </a> <ul id="toc-External_links-sublist" class="vector-toc-list"> </ul> </li> </ul> </div> </div> </nav> </div> </div> <div class="mw-content-container"> <main id="content" class="mw-body"> <header class="mw-body-header vector-page-titlebar"> <nav aria-label="Contents" class="vector-toc-landmark"> <div id="vector-page-titlebar-toc" class="vector-dropdown vector-page-titlebar-toc vector-button-flush-left" title="Table of Contents" > <input type="checkbox" id="vector-page-titlebar-toc-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-page-titlebar-toc" class="vector-dropdown-checkbox " aria-label="Toggle the table of contents" > <label id="vector-page-titlebar-toc-label" for="vector-page-titlebar-toc-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only " aria-hidden="true" ><span class="vector-icon mw-ui-icon-listBullet mw-ui-icon-wikimedia-listBullet"></span> <span class="vector-dropdown-label-text">Toggle the table of contents</span> </label> <div class="vector-dropdown-content"> <div id="vector-page-titlebar-toc-unpinned-container" class="vector-unpinned-container"> </div> </div> </div> </nav> <h1 id="firstHeading" class="firstHeading mw-first-heading"><span class="mw-page-title-main">Newline</span></h1> <div id="p-lang-btn" class="vector-dropdown mw-portlet mw-portlet-lang" > <input type="checkbox" id="p-lang-btn-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-p-lang-btn" class="vector-dropdown-checkbox mw-interlanguage-selector" aria-label="Go to an article in another language. Available in 22 languages" > <label id="p-lang-btn-label" for="p-lang-btn-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--action-progressive mw-portlet-lang-heading-22" aria-hidden="true" ><span class="vector-icon mw-ui-icon-language-progressive mw-ui-icon-wikimedia-language-progressive"></span> <span class="vector-dropdown-label-text">22 languages</span> </label> <div class="vector-dropdown-content"> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li class="interlanguage-link interwiki-ar mw-list-item"><a href="https://ar.wikipedia.org/wiki/%D8%B3%D8%B7%D8%B1_%D8%AC%D8%AF%D9%8A%D8%AF" title="سطر جديد – Arabic" lang="ar" hreflang="ar" data-title="سطر جديد" data-language-autonym="العربية" data-language-local-name="Arabic" class="interlanguage-link-target"><span>العربية</span></a></li><li class="interlanguage-link interwiki-az mw-list-item"><a href="https://az.wikipedia.org/wiki/S%C9%99tir_ke%C3%A7irm%C9%99" title="Sətir keçirmə – Azerbaijani" lang="az" hreflang="az" data-title="Sətir keçirmə" data-language-autonym="Azərbaycanca" data-language-local-name="Azerbaijani" class="interlanguage-link-target"><span>Azərbaycanca</span></a></li><li class="interlanguage-link interwiki-ca mw-list-item"><a href="https://ca.wikipedia.org/wiki/Nova_l%C3%ADnia" title="Nova línia – Catalan" lang="ca" hreflang="ca" data-title="Nova línia" data-language-autonym="Català" data-language-local-name="Catalan" class="interlanguage-link-target"><span>Català</span></a></li><li class="interlanguage-link interwiki-cs mw-list-item"><a href="https://cs.wikipedia.org/wiki/Nov%C3%BD_%C5%99%C3%A1dek" title="Nový řádek – Czech" lang="cs" hreflang="cs" data-title="Nový řádek" data-language-autonym="Čeština" data-language-local-name="Czech" class="interlanguage-link-target"><span>Čeština</span></a></li><li class="interlanguage-link interwiki-de mw-list-item"><a href="https://de.wikipedia.org/wiki/Zeilenumbruch" title="Zeilenumbruch – German" lang="de" hreflang="de" data-title="Zeilenumbruch" data-language-autonym="Deutsch" data-language-local-name="German" class="interlanguage-link-target"><span>Deutsch</span></a></li><li class="interlanguage-link interwiki-es mw-list-item"><a href="https://es.wikipedia.org/wiki/Nueva_l%C3%ADnea" title="Nueva línea – Spanish" lang="es" hreflang="es" data-title="Nueva línea" data-language-autonym="Español" data-language-local-name="Spanish" class="interlanguage-link-target"><span>Español</span></a></li><li class="interlanguage-link interwiki-eo mw-list-item"><a href="https://eo.wikipedia.org/wiki/Novlinio" title="Novlinio – Esperanto" lang="eo" hreflang="eo" data-title="Novlinio" data-language-autonym="Esperanto" data-language-local-name="Esperanto" class="interlanguage-link-target"><span>Esperanto</span></a></li><li class="interlanguage-link interwiki-eu mw-list-item"><a href="https://eu.wikipedia.org/wiki/Lerro-jauzi" title="Lerro-jauzi – Basque" lang="eu" hreflang="eu" data-title="Lerro-jauzi" data-language-autonym="Euskara" data-language-local-name="Basque" class="interlanguage-link-target"><span>Euskara</span></a></li><li class="interlanguage-link interwiki-fa mw-list-item"><a href="https://fa.wikipedia.org/wiki/%D9%86%D9%88%D8%AE%D8%B7" title="نوخط – Persian" lang="fa" hreflang="fa" data-title="نوخط" data-language-autonym="فارسی" data-language-local-name="Persian" class="interlanguage-link-target"><span>فارسی</span></a></li><li class="interlanguage-link interwiki-fr mw-list-item"><a href="https://fr.wikipedia.org/wiki/Fin_de_ligne" title="Fin de ligne – French" lang="fr" hreflang="fr" data-title="Fin de ligne" data-language-autonym="Français" data-language-local-name="French" class="interlanguage-link-target"><span>Français</span></a></li><li class="interlanguage-link interwiki-ko mw-list-item"><a href="https://ko.wikipedia.org/wiki/%EC%83%88%EC%A4%84_%EB%AC%B8%EC%9E%90" title="새줄 문자 – Korean" lang="ko" hreflang="ko" data-title="새줄 문자" data-language-autonym="한국어" data-language-local-name="Korean" class="interlanguage-link-target"><span>한국어</span></a></li><li class="interlanguage-link interwiki-it mw-list-item"><a href="https://it.wikipedia.org/wiki/Ritorno_a_capo" title="Ritorno a capo – Italian" lang="it" hreflang="it" data-title="Ritorno a capo" data-language-autonym="Italiano" data-language-local-name="Italian" class="interlanguage-link-target"><span>Italiano</span></a></li><li class="interlanguage-link interwiki-kk mw-list-item"><a href="https://kk.wikipedia.org/wiki/%D0%96%D0%BE%D0%BB%D0%B4%D0%B0%D1%80%D0%B4%D1%8B_%D1%82%D0%B0%D1%81%D1%8B%D0%BC%D0%B0%D0%BB%D0%B4%D0%B0%D1%83" title="Жолдарды тасымалдау – Kazakh" lang="kk" hreflang="kk" data-title="Жолдарды тасымалдау" data-language-autonym="Қазақша" data-language-local-name="Kazakh" class="interlanguage-link-target"><span>Қазақша</span></a></li><li class="interlanguage-link interwiki-hu mw-list-item"><a href="https://hu.wikipedia.org/wiki/Soremel%C3%A9s" title="Soremelés – Hungarian" lang="hu" hreflang="hu" data-title="Soremelés" data-language-autonym="Magyar" data-language-local-name="Hungarian" class="interlanguage-link-target"><span>Magyar</span></a></li><li class="interlanguage-link interwiki-ja mw-list-item"><a href="https://ja.wikipedia.org/wiki/%E6%94%B9%E8%A1%8C%E3%82%B3%E3%83%BC%E3%83%89" title="改行コード – Japanese" lang="ja" hreflang="ja" data-title="改行コード" data-language-autonym="日本語" data-language-local-name="Japanese" class="interlanguage-link-target"><span>日本語</span></a></li><li class="interlanguage-link interwiki-pl mw-list-item"><a href="https://pl.wikipedia.org/wiki/Koniec_linii" title="Koniec linii – Polish" lang="pl" hreflang="pl" data-title="Koniec linii" data-language-autonym="Polski" data-language-local-name="Polish" class="interlanguage-link-target"><span>Polski</span></a></li><li class="interlanguage-link interwiki-pt mw-list-item"><a href="https://pt.wikipedia.org/wiki/Nova_linha" title="Nova linha – Portuguese" lang="pt" hreflang="pt" data-title="Nova linha" data-language-autonym="Português" data-language-local-name="Portuguese" class="interlanguage-link-target"><span>Português</span></a></li><li class="interlanguage-link interwiki-ru mw-list-item"><a href="https://ru.wikipedia.org/wiki/%D0%9F%D0%B5%D1%80%D0%B5%D0%B2%D0%BE%D0%B4_%D1%81%D1%82%D1%80%D0%BE%D0%BA%D0%B8" title="Перевод строки – Russian" lang="ru" hreflang="ru" data-title="Перевод строки" data-language-autonym="Русский" data-language-local-name="Russian" class="interlanguage-link-target"><span>Русский</span></a></li><li class="interlanguage-link interwiki-simple mw-list-item"><a href="https://simple.wikipedia.org/wiki/Newline" title="Newline – Simple English" lang="en-simple" hreflang="en-simple" data-title="Newline" data-language-autonym="Simple English" data-language-local-name="Simple English" class="interlanguage-link-target"><span>Simple English</span></a></li><li class="interlanguage-link interwiki-uk mw-list-item"><a href="https://uk.wikipedia.org/wiki/%D0%A1%D0%B8%D0%BC%D0%B2%D0%BE%D0%BB_%D0%BD%D0%BE%D0%B2%D0%BE%D0%B3%D0%BE_%D1%80%D1%8F%D0%B4%D0%BA%D0%B0" title="Символ нового рядка – Ukrainian" lang="uk" hreflang="uk" data-title="Символ нового рядка" data-language-autonym="Українська" data-language-local-name="Ukrainian" class="interlanguage-link-target"><span>Українська</span></a></li><li class="interlanguage-link interwiki-zh-yue mw-list-item"><a href="https://zh-yue.wikipedia.org/wiki/%E6%8F%9B%E8%A1%8C" title="換行 – Cantonese" lang="yue" hreflang="yue" data-title="換行" data-language-autonym="粵語" data-language-local-name="Cantonese" class="interlanguage-link-target"><span>粵語</span></a></li><li class="interlanguage-link interwiki-zh mw-list-item"><a href="https://zh.wikipedia.org/wiki/%E6%8F%9B%E8%A1%8C" title="換行 – Chinese" lang="zh" hreflang="zh" data-title="換行" data-language-autonym="中文" data-language-local-name="Chinese" class="interlanguage-link-target"><span>中文</span></a></li> </ul> <div class="after-portlet after-portlet-lang"><span class="wb-langlinks-edit wb-langlinks-link"><a href="https://www.wikidata.org/wiki/Special:EntityPage/Q184914#sitelinks-wikipedia" title="Edit interlanguage links" class="wbc-editpage">Edit links</a></span></div> </div> </div> </div> </header> <div class="vector-page-toolbar"> <div class="vector-page-toolbar-container"> <div id="left-navigation"> <nav aria-label="Namespaces"> <div id="p-associated-pages" class="vector-menu vector-menu-tabs mw-portlet mw-portlet-associated-pages" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="ca-nstab-main" class="selected vector-tab-noicon mw-list-item"><a href="/wiki/Newline" title="View the content page [c]" accesskey="c"><span>Article</span></a></li><li id="ca-talk" class="vector-tab-noicon mw-list-item"><a href="/wiki/Talk:Newline" rel="discussion" title="Discuss improvements to the content page [t]" accesskey="t"><span>Talk</span></a></li> </ul> </div> </div> <div id="vector-variants-dropdown" class="vector-dropdown emptyPortlet" > <input type="checkbox" id="vector-variants-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-variants-dropdown" class="vector-dropdown-checkbox " aria-label="Change language variant" > <label id="vector-variants-dropdown-label" for="vector-variants-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet" aria-hidden="true" ><span class="vector-dropdown-label-text">English</span> </label> <div class="vector-dropdown-content"> <div id="p-variants" class="vector-menu mw-portlet mw-portlet-variants emptyPortlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> </div> </div> </div> </div> </nav> </div> <div id="right-navigation" class="vector-collapsible"> <nav aria-label="Views"> <div id="p-views" class="vector-menu vector-menu-tabs mw-portlet mw-portlet-views" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="ca-view" class="selected vector-tab-noicon mw-list-item"><a href="/wiki/Newline"><span>Read</span></a></li><li id="ca-edit" class="vector-tab-noicon mw-list-item"><a href="/w/index.php?title=Newline&action=edit" title="Edit this page [e]" accesskey="e"><span>Edit</span></a></li><li id="ca-history" class="vector-tab-noicon mw-list-item"><a href="/w/index.php?title=Newline&action=history" title="Past revisions of this page [h]" accesskey="h"><span>View history</span></a></li> </ul> </div> </div> </nav> <nav class="vector-page-tools-landmark" aria-label="Page tools"> <div id="vector-page-tools-dropdown" class="vector-dropdown vector-page-tools-dropdown" > <input type="checkbox" id="vector-page-tools-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-page-tools-dropdown" class="vector-dropdown-checkbox " aria-label="Tools" > <label id="vector-page-tools-dropdown-label" for="vector-page-tools-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet" aria-hidden="true" ><span class="vector-dropdown-label-text">Tools</span> </label> <div class="vector-dropdown-content"> <div id="vector-page-tools-unpinned-container" class="vector-unpinned-container"> <div id="vector-page-tools" class="vector-page-tools vector-pinnable-element"> <div class="vector-pinnable-header vector-page-tools-pinnable-header vector-pinnable-header-unpinned" data-feature-name="page-tools-pinned" data-pinnable-element-id="vector-page-tools" data-pinned-container-id="vector-page-tools-pinned-container" data-unpinned-container-id="vector-page-tools-unpinned-container" > <div class="vector-pinnable-header-label">Tools</div> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-page-tools.pin">move to sidebar</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-page-tools.unpin">hide</button> </div> <div id="p-cactions" class="vector-menu mw-portlet mw-portlet-cactions emptyPortlet vector-has-collapsible-items" title="More options" > <div class="vector-menu-heading"> Actions </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="ca-more-view" class="selected vector-more-collapsible-item mw-list-item"><a href="/wiki/Newline"><span>Read</span></a></li><li id="ca-more-edit" class="vector-more-collapsible-item mw-list-item"><a href="/w/index.php?title=Newline&action=edit" title="Edit this page [e]" accesskey="e"><span>Edit</span></a></li><li id="ca-more-history" class="vector-more-collapsible-item mw-list-item"><a href="/w/index.php?title=Newline&action=history"><span>View history</span></a></li> </ul> </div> </div> <div id="p-tb" class="vector-menu mw-portlet mw-portlet-tb" > <div class="vector-menu-heading"> General </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="t-whatlinkshere" class="mw-list-item"><a href="/wiki/Special:WhatLinksHere/Newline" title="List of all English Wikipedia pages containing links to this page [j]" accesskey="j"><span>What links here</span></a></li><li id="t-recentchangeslinked" class="mw-list-item"><a href="/wiki/Special:RecentChangesLinked/Newline" rel="nofollow" title="Recent changes in pages linked from this page [k]" accesskey="k"><span>Related changes</span></a></li><li id="t-upload" class="mw-list-item"><a href="//en.wikipedia.org/wiki/Wikipedia:File_Upload_Wizard" title="Upload files [u]" accesskey="u"><span>Upload file</span></a></li><li id="t-permalink" class="mw-list-item"><a href="/w/index.php?title=Newline&oldid=1283173537" title="Permanent link to this revision of this page"><span>Permanent link</span></a></li><li id="t-info" class="mw-list-item"><a href="/w/index.php?title=Newline&action=info" title="More information about this page"><span>Page information</span></a></li><li id="t-cite" class="mw-list-item"><a href="/w/index.php?title=Special:CiteThisPage&page=Newline&id=1283173537&wpFormIdentifier=titleform" title="Information on how to cite this page"><span>Cite this page</span></a></li><li id="t-urlshortener" class="mw-list-item"><a href="/w/index.php?title=Special:UrlShortener&url=https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FNewline"><span>Get shortened URL</span></a></li><li id="t-urlshortener-qrcode" class="mw-list-item"><a href="/w/index.php?title=Special:QrCode&url=https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FNewline"><span>Download QR code</span></a></li> </ul> </div> </div> <div id="p-coll-print_export" class="vector-menu mw-portlet mw-portlet-coll-print_export" > <div class="vector-menu-heading"> Print/export </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="coll-download-as-rl" class="mw-list-item"><a href="/w/index.php?title=Special:DownloadAsPdf&page=Newline&action=show-download-screen" title="Download this page as a PDF file"><span>Download as PDF</span></a></li><li id="t-print" class="mw-list-item"><a href="/w/index.php?title=Newline&printable=yes" title="Printable version of this page [p]" accesskey="p"><span>Printable version</span></a></li> </ul> </div> </div> <div id="p-wikibase-otherprojects" class="vector-menu mw-portlet mw-portlet-wikibase-otherprojects" > <div class="vector-menu-heading"> In other projects </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="t-wikibase" class="wb-otherproject-link wb-otherproject-wikibase-dataitem mw-list-item"><a href="https://www.wikidata.org/wiki/Special:EntityPage/Q184914" title="Structured data on this page hosted by Wikidata [g]" accesskey="g"><span>Wikidata item</span></a></li> </ul> </div> </div> </div> </div> </div> </div> </nav> </div> </div> </div> <div class="vector-column-end"> <div class="vector-sticky-pinned-container"> <nav class="vector-page-tools-landmark" aria-label="Page tools"> <div id="vector-page-tools-pinned-container" class="vector-pinned-container"> </div> </nav> <nav class="vector-appearance-landmark" aria-label="Appearance"> <div id="vector-appearance-pinned-container" class="vector-pinned-container"> <div id="vector-appearance" class="vector-appearance vector-pinnable-element"> <div class="vector-pinnable-header vector-appearance-pinnable-header vector-pinnable-header-pinned" data-feature-name="appearance-pinned" data-pinnable-element-id="vector-appearance" data-pinned-container-id="vector-appearance-pinned-container" data-unpinned-container-id="vector-appearance-unpinned-container" > <div class="vector-pinnable-header-label">Appearance</div> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-appearance.pin">move to sidebar</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-appearance.unpin">hide</button> </div> </div> </div> </nav> </div> </div> <div id="bodyContent" class="vector-body" aria-labelledby="firstHeading" data-mw-ve-target-container> <div class="vector-body-before-content"> <div class="mw-indicators"> </div> <div id="siteSub" class="noprint">From Wikipedia, the free encyclopedia</div> </div> <div id="contentSub"><div id="mw-content-subtitle"></div></div> <div id="mw-content-text" class="mw-body-content"><div class="mw-content-ltr mw-parser-output" lang="en" dir="ltr"><div class="shortdescription nomobile noexcerpt noprint searchaux" style="display:none">Special characters in computing signifying the end of a line of text</div> <style data-mw-deduplicate="TemplateStyles:r1236090951">.mw-parser-output .hatnote{font-style:italic}.mw-parser-output div.hatnote{padding-left:1.6em;margin-bottom:0.5em}.mw-parser-output .hatnote i{font-style:normal}.mw-parser-output .hatnote+link+.hatnote{margin-top:-0.5em}@media print{body.ns-0 .mw-parser-output .hatnote{display:none!important}}</style><div role="note" class="hatnote navigation-not-searchable">For other uses, see <a href="/wiki/New_Line_(disambiguation)" class="mw-disambig" title="New Line (disambiguation)">New Line (disambiguation)</a>.</div> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1236090951" /><div role="note" class="hatnote navigation-not-searchable">"Endl" redirects here. For the botanist, see <a href="/wiki/Stephan_Endlicher" title="Stephan Endlicher">Stephan Endlicher</a>.</div> <p class="mw-empty-elt"> </p> <style data-mw-deduplicate="TemplateStyles:r1251242444">.mw-parser-output .ambox{border:1px solid #a2a9b1;border-left:10px solid #36c;background-color:#fbfbfb;box-sizing:border-box}.mw-parser-output .ambox+link+.ambox,.mw-parser-output .ambox+link+style+.ambox,.mw-parser-output .ambox+link+link+.ambox,.mw-parser-output .ambox+.mw-empty-elt+link+.ambox,.mw-parser-output .ambox+.mw-empty-elt+link+style+.ambox,.mw-parser-output .ambox+.mw-empty-elt+link+link+.ambox{margin-top:-1px}html body.mediawiki .mw-parser-output .ambox.mbox-small-left{margin:4px 1em 4px 0;overflow:hidden;width:238px;border-collapse:collapse;font-size:88%;line-height:1.25em}.mw-parser-output .ambox-speedy{border-left:10px solid #b32424;background-color:#fee7e6}.mw-parser-output .ambox-delete{border-left:10px solid #b32424}.mw-parser-output .ambox-content{border-left:10px solid #f28500}.mw-parser-output .ambox-style{border-left:10px solid #fc3}.mw-parser-output .ambox-move{border-left:10px solid #9932cc}.mw-parser-output .ambox-protection{border-left:10px solid #a2a9b1}.mw-parser-output .ambox .mbox-text{border:none;padding:0.25em 0.5em;width:100%}.mw-parser-output .ambox .mbox-image{border:none;padding:2px 0 2px 0.5em;text-align:center}.mw-parser-output .ambox .mbox-imageright{border:none;padding:2px 0.5em 2px 0;text-align:center}.mw-parser-output .ambox .mbox-empty-cell{border:none;padding:0;width:1px}.mw-parser-output .ambox .mbox-image-div{width:52px}@media(min-width:720px){.mw-parser-output .ambox{margin:0 10%}}@media print{body.ns-0 .mw-parser-output .ambox{display:none!important}}</style><table class="box-More_citations_needed plainlinks metadata ambox ambox-content ambox-Refimprove" role="presentation"><tbody><tr><td class="mbox-image"><div class="mbox-image-div"><span typeof="mw:File"><a href="/wiki/File:Question_book-new.svg" class="mw-file-description"><img alt="" src="//upload.wikimedia.org/wikipedia/en/thumb/9/99/Question_book-new.svg/50px-Question_book-new.svg.png" decoding="async" width="50" height="39" class="mw-file-element" srcset="//upload.wikimedia.org/wikipedia/en/thumb/9/99/Question_book-new.svg/75px-Question_book-new.svg.png 1.5x, //upload.wikimedia.org/wikipedia/en/thumb/9/99/Question_book-new.svg/100px-Question_book-new.svg.png 2x" data-file-width="512" data-file-height="399" /></a></span></div></td><td class="mbox-text"><div class="mbox-text-span">This article <b>needs additional citations for <a href="/wiki/Wikipedia:Verifiability" title="Wikipedia:Verifiability">verification</a></b>.<span class="hide-when-compact"> Please help <a href="/wiki/Special:EditPage/Newline" title="Special:EditPage/Newline">improve this article</a> by <a href="/wiki/Help:Referencing_for_beginners" title="Help:Referencing for beginners">adding citations to reliable sources</a>. Unsourced material may be challenged and removed.<br /><small><span class="plainlinks"><i>Find sources:</i> <a rel="nofollow" class="external text" href="https://www.google.com/search?as_eq=wikipedia&q=%22Newline%22">"Newline"</a> – <a rel="nofollow" class="external text" href="https://www.google.com/search?tbm=nws&q=%22Newline%22+-wikipedia&tbs=ar:1">news</a> <b>·</b> <a rel="nofollow" class="external text" href="https://www.google.com/search?&q=%22Newline%22&tbs=bkt:s&tbm=bks">newspapers</a> <b>·</b> <a rel="nofollow" class="external text" href="https://www.google.com/search?tbs=bks:1&q=%22Newline%22+-wikipedia">books</a> <b>·</b> <a rel="nofollow" class="external text" href="https://scholar.google.com/scholar?q=%22Newline%22">scholar</a> <b>·</b> <a rel="nofollow" class="external text" href="https://www.jstor.org/action/doBasicSearch?Query=%22Newline%22&acc=on&wc=on">JSTOR</a></span></small></span> <span class="date-container"><i>(<span class="date">February 2016</span>)</i></span><span class="hide-when-compact"><i> (<small><a href="/wiki/Help:Maintenance_template_removal" title="Help:Maintenance template removal">Learn how and when to remove this message</a></small>)</i></span></div></td></tr></tbody></table> <figure class="mw-default-size" typeof="mw:File/Thumb"><a href="/wiki/File:Illustration_of_a_newline.png" class="mw-file-description"><img src="//upload.wikimedia.org/wikipedia/commons/thumb/b/b3/Illustration_of_a_newline.png/220px-Illustration_of_a_newline.png" decoding="async" width="220" height="117" class="mw-file-element" srcset="//upload.wikimedia.org/wikipedia/commons/thumb/b/b3/Illustration_of_a_newline.png/330px-Illustration_of_a_newline.png 1.5x, //upload.wikimedia.org/wikipedia/commons/thumb/b/b3/Illustration_of_a_newline.png/440px-Illustration_of_a_newline.png 2x" data-file-width="460" data-file-height="245" /></a><figcaption>A newline inserted between the words "Hello" and "world"</figcaption></figure> <p>A <b>newline</b> (frequently called <b>line ending</b>, <b>end of line</b> (<b>EOL</b>), <b>next line</b> (<b>NEL</b>) or <b>line break</b>) is a <a href="/wiki/Control_character" title="Control character">control character</a> or sequence of control characters in character encoding specifications such as <a href="/wiki/ASCII" title="ASCII">ASCII</a>, EBCDIC, <a href="/wiki/Unicode" title="Unicode">Unicode</a>, etc. This character, or a sequence of characters, is used to signify the end of a <a href="/wiki/Line_(text_file)" title="Line (text file)">line of text</a> and the start of a new one.<sup id="cite_ref-1" class="reference"><a href="#cite_note-1"><span class="cite-bracket">[</span>1<span class="cite-bracket">]</span></a></sup> </p> <meta property="mw:PageProp/toc" /> <div class="mw-heading mw-heading2"><h2 id="History">History</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Newline&action=edit&section=1" title="Edit section: History"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>In the mid-1800s, long before the advent of <a href="/wiki/Teleprinter" title="Teleprinter">teleprinters</a> and teletype machines, <a href="/wiki/Morse_code" title="Morse code">Morse code</a> operators or <a href="/wiki/Telegraphist" title="Telegraphist">telegraphists</a> invented and used <a href="/wiki/Prosigns_for_Morse_code" title="Prosigns for Morse code">Morse code prosigns</a> to encode white space text formatting in formal written text messages. In particular, the <a href="/wiki/International_Morse_code" class="mw-redirect" title="International Morse code">Morse</a> prosign <b><span style="text-decoration:overline;">BT</span></b> (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 <i>new line</i> or <i>new section</i> in a formal text message. </p><p>Later, in the age of modern <a href="/wiki/Teleprinter" title="Teleprinter">teleprinters</a>, standardized character set control codes were developed to aid in white space text formatting. ASCII was developed simultaneously by the <a href="/wiki/International_Organization_for_Standardization" title="International Organization for Standardization">International Organization for Standardization</a> (ISO) and the American Standards Association (ASA), the latter being the predecessor organization to <a href="/wiki/American_National_Standards_Institute" title="American National Standards Institute">American National Standards Institute</a> (ANSI). During the period of 1963 to 1968, the ISO draft standards supported the use of either <a href="#Representation"><style data-mw-deduplicate="TemplateStyles:r886049734">.mw-parser-output .monospaced{font-family:monospace,monospace}</style><span class="monospaced">CR</span>+<link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced">LF</span></a> or <a href="#Representation"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced">LF</span></a> alone as a newline, while the ASA drafts supported only <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced">CR</span>+<link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced">LF</span>. </p><p>The sequence <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced">CR</span>+<link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced">LF</span> was commonly used on many early computer systems that had adopted <a href="/wiki/Teletype_Corporation" title="Teletype Corporation">Teletype</a> machines—typically a <a href="/wiki/Teletype_Model_33" title="Teletype Model 33">Teletype Model 33</a> 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 <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced">CR</span> 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: <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced">CR</span> to move the carriage to column one, and <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced">LF</span> to move the paper up."<sup id="cite_ref-2" class="reference"><a href="#cite_note-2"><span class="cite-bracket">[</span>2<span class="cite-bracket">]</span></a></sup> In fact, it was often necessary to send <a href="/wiki/Output_padding" title="Output padding">extra padding characters</a>—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 <a href="/wiki/Scrolling" title="Scrolling">scroll</a> the display. </p><p>On such systems, applications had to talk directly to the Teletype machine and follow its conventions since the concept of <a href="/wiki/Device_driver" title="Device driver">device drivers</a> 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 <a href="/wiki/Digital_Equipment_Corporation" title="Digital Equipment Corporation">DEC</a> used this convention. <a href="/wiki/CP/M" title="CP/M">CP/M</a> also used it in order to print on the same terminals that minicomputers used. From there <a href="/wiki/MS-DOS" title="MS-DOS">MS-DOS</a> (1981) adopted <a href="/wiki/CP/M" title="CP/M">CP/M</a>'s <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced">CR</span>+<link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced">LF</span> in order to be compatible, and this convention was inherited by Microsoft's later <a href="/wiki/Microsoft_Windows" title="Microsoft Windows">Windows</a> operating system. </p><p>The <a href="/wiki/Multics" title="Multics">Multics</a> operating system began development in 1964 and used <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced">LF</span> alone as its newline. Multics used a device driver to translate this character to whatever sequence a printer needed (including extra <a href="/wiki/Output_padding" title="Output padding">padding characters</a>), and the single byte was more convenient for programming. What seems like a more obvious choice—<link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced">CR</span>—was not used, as <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced">CR</span> provided the useful function of overprinting one line with another to create <a href="/wiki/Emphasis_(typography)" title="Emphasis (typography)">boldface</a>, <a href="/wiki/Underscore" title="Underscore">underscore</a> and <a href="/wiki/Strikethrough" title="Strikethrough">strikethrough</a> effects. Perhaps more importantly, the use of <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced">LF</span> alone as a line terminator had already been incorporated into drafts of the eventual <a href="/wiki/ISO/IEC_646" title="ISO/IEC 646">ISO/IEC 646</a> standard. <a href="/wiki/Unix" title="Unix">Unix</a> followed the Multics practice, and later <a href="/wiki/Unix-like" title="Unix-like">Unix-like</a> systems followed Unix. This created conflicts between Windows and Unix-like <a href="/wiki/Operating_system" title="Operating system">operating systems</a>, whereby files composed on one operating system could not be properly formatted or interpreted by another operating system (for example a <a href="/wiki/UNIX_shell_script" class="mw-redirect" title="UNIX shell script">UNIX shell script</a> written in a Windows text editor like <a href="/wiki/Microsoft_Notepad" class="mw-redirect" title="Microsoft Notepad">Notepad</a><sup id="cite_ref-3" class="reference"><a href="#cite_note-3"><span class="cite-bracket">[</span>3<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-4" class="reference"><a href="#cite_note-4"><span class="cite-bracket">[</span>4<span class="cite-bracket">]</span></a></sup>). </p> <div class="mw-heading mw-heading2"><h2 id="Representation">Representation</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Newline&action=edit&section=2" title="Edit section: Representation"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>The concepts of <a href="/wiki/Carriage_return" title="Carriage return">carriage return</a> (CR) and line feed (LF) are closely associated and can be considered either separately or together. In the physical media of <a href="/wiki/Typewriter" title="Typewriter">typewriters</a> and <a href="/wiki/Printer_(computing)" title="Printer (computing)">printers</a>, two <a href="/wiki/Cartesian_coordinate_system" title="Cartesian coordinate system">axes</a> of motion, "down" and "across", are needed to create a new line on the <a href="/wiki/Page_(paper)" title="Page (paper)">page</a>. Although the design of a machine (typewriter or printer) must consider them separately, the abstract logic of software can combine them together as one event. This is why a newline in <a href="/wiki/Character_encoding" title="Character encoding">character encoding</a> can be defined as <code class="mw-highlight mw-highlight-lang-text mw-content-ltr" style="" dir="ltr">CR</code> and <code class="mw-highlight mw-highlight-lang-text mw-content-ltr" style="" dir="ltr">LF</code> combined into one (commonly called <code class="mw-highlight mw-highlight-lang-text mw-content-ltr" style="" dir="ltr">CR+LF</code> or <code class="mw-highlight mw-highlight-lang-text mw-content-ltr" style="" dir="ltr">CRLF</code>). </p><p>Some <a href="/wiki/Character_encoding" title="Character encoding">character sets</a> provide a separate newline character code. <a href="/wiki/EBCDIC" title="EBCDIC">EBCDIC</a>, for example, provides an <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced">NL</span> character code in addition to the <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced">CR</span> and <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced">LF</span> codes. <a href="/wiki/Unicode" title="Unicode">Unicode</a>, in addition to providing the <a href="/wiki/ASCII" title="ASCII">ASCII</a> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced">CR</span> and <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced">LF</span> <a href="/wiki/Control_character" title="Control character">control codes</a>, also provides a "next line" (<link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced">NEL</span>) control code, as well as control codes for "line separator" and "paragraph separator" markers. Unicode also contains printable characters for visually representing line feed ␊, carriage return ␍, and other C0 control codes (as well as a generic newline, ) in the <a href="/wiki/Unicode_control_characters#Control_Pictures" title="Unicode control characters">Control Pictures</a> block. </p> <table class="wikitable plainrowheaders" style="text-align: center;"> <caption>Software applications and operating system representation of a newline with one or two <a href="/wiki/Control_character" title="Control character">control characters</a> </caption> <tbody><tr> <th scope="col"><a href="/wiki/Operating_system" title="Operating system">Operating system</a> </th> <th scope="col"><a href="/wiki/Character_encoding" title="Character encoding">Character encoding</a> </th> <th scope="col">Abbreviation </th> <th scope="col"><a href="/wiki/Hexadecimal" title="Hexadecimal">hex</a> value </th> <th scope="col"><a href="/wiki/Decimal" title="Decimal">dec</a> value </th> <th scope="col"><a href="/wiki/Escape_sequence" title="Escape sequence">Escape sequence</a> </th></tr> <tr> <th scope="row" style="text-align:left;"><a href="/wiki/Multics" title="Multics">Multics</a><br /><a href="/wiki/POSIX" title="POSIX">POSIX</a> standard oriented systems: <a href="/wiki/Unix" title="Unix">Unix</a> and <a href="/wiki/Unix-like" title="Unix-like">Unix-like</a> systems (<a href="/wiki/Linux" title="Linux">Linux</a>, <a href="/wiki/MacOS" title="MacOS">macOS</a>, <a href="/wiki/List_of_BSD_operating_systems" title="List of BSD operating systems">*BSD</a>, <a href="/wiki/IBM_AIX" title="IBM AIX">AIX</a>, <a href="/wiki/Xenix" title="Xenix">Xenix</a>, etc.), <a href="/wiki/QNX" title="QNX">QNX</a> 4+<br />Others: <a href="/wiki/BeOS" title="BeOS">BeOS</a>, <a href="/wiki/Amiga" title="Amiga">Amiga</a>, <a href="/wiki/RISC_OS" title="RISC OS">RISC OS</a>, and others<sup id="cite_ref-5" class="reference"><a href="#cite_note-5"><span class="cite-bracket">[</span>5<span class="cite-bracket">]</span></a></sup> </th> <td rowspan="5"><a href="/wiki/ASCII" title="ASCII">ASCII</a> </td> <td><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced">LF</span> </td> <td><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced">0A</span> </td> <td><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced">10</span> </td> <td><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced">\n</span> </td></tr> <tr> <th scope="row" style="text-align:left;"><a href="/wiki/Windows" class="mw-redirect" title="Windows">Windows</a>, <a href="/wiki/MS-DOS" title="MS-DOS">MS-DOS</a> compatibles, <a href="/wiki/Atari_TOS" title="Atari TOS">Atari TOS</a>, <a href="/wiki/Digital_Equipment_Corporation" title="Digital Equipment Corporation">DEC</a> <a href="/wiki/TOPS-10" title="TOPS-10">TOPS-10</a>, <a href="/wiki/RT-11" title="RT-11">RT-11</a>, <a href="/wiki/CP/M" title="CP/M">CP/M</a>, <a href="/wiki/MP/M" title="MP/M">MP/M</a>, <a href="/wiki/OS/2" title="OS/2">OS/2</a>, <a href="/wiki/Symbian_OS" class="mw-redirect" title="Symbian OS">Symbian OS</a>, <a href="/wiki/Palm_OS" title="Palm OS">Palm OS</a>, <a href="/wiki/Amstrad_CPC" title="Amstrad CPC">Amstrad CPC</a>, and most other early non-Unix and non-IBM operating systems </th> <td><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced">CR LF</span> </td> <td><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced">0D 0A</span> </td> <td><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced">13 10</span> </td> <td><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced">\r\n</span> </td></tr> <tr> <th scope="row" style="text-align:left;"><a href="/wiki/Commodore_64" title="Commodore 64">Commodore 64</a>, <a href="/wiki/Commodore_128" title="Commodore 128">Commodore 128</a>, <a href="/wiki/BBC_Micro" title="BBC Micro">Acorn BBC</a>, <a href="/wiki/ZX_Spectrum" title="ZX Spectrum">ZX Spectrum</a>, <a href="/wiki/TRS-80" title="TRS-80">TRS-80</a>, <a href="/wiki/Apple_II" title="Apple II">Apple II</a>, <a href="/wiki/Oberon_(operating_system)" title="Oberon (operating system)">Oberon</a>, <a href="/wiki/Classic_Mac_OS" title="Classic Mac OS">classic Mac OS</a>, <a href="/wiki/HP_Series_80" title="HP Series 80">HP Series 80</a>, MIT <a href="/wiki/Lisp_machine" title="Lisp machine">Lisp Machine</a>, and <a href="/wiki/OS-9" title="OS-9">OS-9</a> </th> <td><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced">CR</span> </td> <td><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced">0D</span> </td> <td><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced">13</span> </td> <td><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced">\r</span> </td></tr> <tr> <th scope="row" style="text-align:left;"><a href="/wiki/BBC_Micro" title="BBC Micro">Acorn BBC</a><sup id="cite_ref-6" class="reference"><a href="#cite_note-6"><span class="cite-bracket">[</span>6<span class="cite-bracket">]</span></a></sup> and <a href="/wiki/RISC_OS" title="RISC OS">RISC OS</a> spooled text output<sup id="cite_ref-7" class="reference"><a href="#cite_note-7"><span class="cite-bracket">[</span>7<span class="cite-bracket">]</span></a></sup> </th> <td><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced">LF CR</span> </td> <td><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced">0A 0D</span> </td> <td><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced">10 13</span> </td> <td><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced">\n\r</span> </td></tr> <tr> <th scope="row" style="text-align:left;"><a href="/wiki/QNX" title="QNX">QNX</a> pre-POSIX implementation (version < 4) </th> <td><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced"><a href="/wiki/Record_Separator" class="mw-redirect" title="Record Separator">RS</a></span> </td> <td><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced">1E</span> </td> <td><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced">30</span> </td> <td><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced">\036</span> </td></tr> <tr> <th scope="row" style="text-align:left;"><a href="/wiki/Atari_8-bit_computers" title="Atari 8-bit computers">Atari 8-bit computers</a> </th> <td rowspan="1"><a href="/wiki/ATASCII" title="ATASCII">ATASCII</a> </td> <td><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced">EOL</span> </td> <td><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced">9B</span> </td> <td><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced">155</span> </td> <td> </td></tr> <tr> <th scope="row" style="text-align:left;"><a href="/wiki/IBM" title="IBM">IBM</a> mainframe systems, including <a href="/wiki/Z/OS" title="Z/OS">z/OS</a> (<a href="/wiki/OS/390" title="OS/390">OS/390</a>) and <a href="/wiki/IBM_i" title="IBM i">IBM i</a> (<a href="/wiki/OS/400" class="mw-redirect" title="OS/400">OS/400</a>) </th> <td><a href="/wiki/EBCDIC" title="EBCDIC">EBCDIC</a> </td> <td><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced">NL</span> </td> <td><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced">15</span> </td> <td><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced">21</span> </td> <td><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced">\025</span> </td></tr> <tr> <th scope="row" style="text-align:left;"><a href="/wiki/ZX80" title="ZX80">ZX80</a> and <a href="/wiki/ZX81" title="ZX81">ZX81</a> (home computers from <a href="/wiki/Sinclair_Research" title="Sinclair Research">Sinclair Research Ltd</a>) </th> <td><a href="/wiki/ZX80_character_set" title="ZX80 character set">ZX80</a>/<a href="/wiki/ZX81_character_set" title="ZX81 character set">ZX81</a> proprietary encoding </td> <td> </td> <td><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced">76</span> </td> <td><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced">118</span> </td> <td> </td></tr></tbody></table> <ul><li><a href="/wiki/EBCDIC" title="EBCDIC">EBCDIC</a> systems—mainly <a href="/wiki/IBM" title="IBM">IBM</a> mainframe systems, including <a href="/wiki/Z/OS" title="Z/OS">z/OS</a> (<a href="/wiki/OS/390" title="OS/390">OS/390</a>) and <a href="/wiki/IBM_i" title="IBM i">IBM i</a> (<a href="/wiki/OS/400" class="mw-redirect" title="OS/400">OS/400</a>)—use <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced">NL</span> (New Line, <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced">0x15</span>)<sup id="cite_ref-8" class="reference"><a href="#cite_note-8"><span class="cite-bracket">[</span>8<span class="cite-bracket">]</span></a></sup> as the character combining the functions of line feed and carriage return. The equivalent Unicode character (<code class="mw-highlight mw-highlight-lang-text mw-content-ltr" style="" dir="ltr">0x85</code>) is called <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced">NEL</span> (Next Line). EBCDIC also has control characters called <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced">CR</span> and <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced">LF</span>, but the numerical value of <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced">LF</span> (<link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced">0x25</span>) differs from the one used by ASCII (<link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced">0x0A</span>). Additionally, some EBCDIC variants also use <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced">NL</span> but assign a different numeric code to the character. However, those operating systems use a <a href="/wiki/Record-oriented_filesystem" title="Record-oriented filesystem">record-based file system</a>, which stores text files as one record per line. In most file formats, no line terminators are actually stored.</li> <li>Operating systems for the <a href="/wiki/CDC_6000_series" title="CDC 6000 series">CDC 6000 series</a> defined a newline as two or more zero-valued six-bit characters at the end of a 60-bit word. Some configurations also defined a zero-valued character as a <a href="/wiki/Colon_(punctuation)" title="Colon (punctuation)">colon</a> character, with the result that multiple colons could be interpreted as a newline depending on position.</li> <li><a href="/wiki/RSX-11" title="RSX-11">RSX-11</a> and <a href="/wiki/OpenVMS" title="OpenVMS">OpenVMS</a> also use a record-based file system, which stores text files as one record per line. In most file formats, no line terminators are actually stored, but the <a href="/wiki/Record_Management_Services" title="Record Management Services">Record Management Services</a> facility can transparently add a terminator to each line when it is retrieved by an application. The records themselves can contain the same line terminator characters, which can either be considered a feature or a nuisance depending on the application. RMS not only stores records, but also stores metadata about the record separators in different bits for the file to complicate matters even more (since files can have fixed length records, records that are prefixed by a count or records that are terminated by a specific character). The bits are not generic, so while they can specify that <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced">CR</span><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced">LF</span> or <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced">LF</span> or even <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced">CR</span> is the line terminator, they can not substitute some other code.</li> <li><i>Fixed line length</i> was used by some early <a href="/wiki/Mainframe_computer" title="Mainframe computer">mainframe</a> operating systems. In such a system, an implicit end-of-line was assumed every 72 or 80 characters, for example. No newline character was stored. If a file was imported from the outside world, lines shorter than the line length had to be padded with spaces, while lines longer than the line length had to be truncated. This mimicked the use of <a href="/wiki/Punched_card" title="Punched card">punched cards</a>, on which each line was stored on a separate card, usually with 80 columns on each card, often with sequence numbers in columns 73–80. Many of these systems added a <a href="/wiki/ASA_carriage_control_characters" title="ASA carriage control characters">carriage control character</a> to the start of the <i>next</i> record; this could indicate whether the next record was a continuation of the line started by the previous record, or a new line, or should overprint the previous line (similar to a <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced">CR</span>). Often this was a normal printing character such as <code class="mw-highlight mw-highlight-lang-text mw-content-ltr" style="" dir="ltr">#</code> that thus could not be used as the first character in a line. Some early line printers interpreted these characters directly in the records sent to them.</li></ul> <div class="mw-heading mw-heading3"><h3 id="Communication_protocols">Communication protocols</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Newline&action=edit&section=3" title="Edit section: Communication protocols"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Many communications protocols have some sort of new line convention. In particular, protocols published by the <a href="/wiki/Internet_Engineering_Task_Force" title="Internet Engineering Task Force">Internet Engineering Task Force</a> (IETF) typically use the ASCII CRLF sequence. </p><p>In some older protocols, the new line may be followed by a checksum or parity character. </p> <div class="mw-heading mw-heading3"><h3 id="Unicode">Unicode</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Newline&action=edit&section=4" title="Edit section: Unicode"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1236090951" /><div role="note" class="hatnote navigation-not-searchable">"Paragraph separator" redirects here. For the symbol also known as a "paragraph sign", see <a href="/wiki/Pilcrow" title="Pilcrow">Pilcrow</a>.</div> <p>The <a href="/wiki/Unicode" title="Unicode">Unicode</a> standard defines a number of characters that conforming applications should recognize as line terminators:<sup id="cite_ref-9" class="reference"><a href="#cite_note-9"><span class="cite-bracket">[</span>9<span class="cite-bracket">]</span></a></sup> </p> <table> <tbody><tr> <td><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced"> <style data-mw-deduplicate="TemplateStyles:r936282034">.mw-parser-output .control-code-link-internal{border-bottom:1px dashed #86a1ff}.mw-parser-output .control-code-link-internal a{color:inherit}</style><a href="/wiki/Line_feed" class="mw-redirect" title="Line feed">LF</a></span>:</td> <td>Line Feed, <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced">U+000A</span> </td></tr> <tr> <td><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced"> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r936282034" /><a href="/wiki/Vertical_Tab" class="mw-redirect" title="Vertical Tab">VT</a></span>:</td> <td><a href="/wiki/Vertical_Tab" class="mw-redirect" title="Vertical Tab">Vertical Tab</a>, <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced">U+000B</span> </td></tr> <tr> <td><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced"> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r936282034" /><a href="/wiki/Form_feed" class="mw-redirect" title="Form feed">FF</a></span>:</td> <td><a href="/wiki/Form_Feed" class="mw-redirect" title="Form Feed">Form Feed</a>, <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced">U+000C</span> </td></tr> <tr> <td><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced"> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r936282034" /><a href="/wiki/Carriage_return" title="Carriage return">CR</a></span>:</td> <td><a href="/wiki/Carriage_return" title="Carriage return">Carriage Return</a>, <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced">U+000D</span> </td></tr> <tr> <td><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced"> CR</span>+<link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced">LF</span>:</td> <td><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced">CR</span> (<link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced">U+000D</span>) followed by <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced">LF</span> (<link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced">U+000A</span>) </td></tr> <tr> <td><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced"> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r936282034" /><a href="/wiki/C0_and_C1_control_codes#NEL" title="C0 and C1 control codes">NEL</a></span>:</td> <td>Next Line, <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced">U+0085</span> </td></tr> <tr> <td><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced"> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r936282034" /><a href="/wiki/Line_separator#Unicode" class="mw-redirect" title="Line separator">LS</a></span>:</td> <td>Line Separator, <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced">U+2028</span> </td></tr> <tr> <td><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced"> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r936282034" /><a href="/wiki/Line_separator#Unicode" class="mw-redirect" title="Line separator">PS</a></span>:</td> <td>Paragraph Separator, <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced">U+2029</span> </td></tr></tbody></table> <p>While it may seem overly complicated compared to an approach such as converting all line terminators to a single character (e.g. <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced">LF</span>), because Unicode is designed to preserve all information when converting a text file from any existing encoding to Unicode and back (<a href="/wiki/Round-trip_format_conversion" title="Round-trip format conversion">round-trip integrity</a>), Unicode needs to make the same distinctions between line breaks made by other encodings. For instance <a href="/wiki/EBCDIC" title="EBCDIC">EBCDIC</a> has <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r936282034" /><a href="/wiki/EBCDIC#NL" title="EBCDIC">NL</a></span>, <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r936282034" /><a href="/wiki/Carriage_return" title="Carriage return">CR</a></span>, and <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r936282034" /><a href="/wiki/Line_feed" class="mw-redirect" title="Line feed">LF</a></span> characters, so all three have to also exist in Unicode. </p><p>Most newline characters and sequences are in <a href="/wiki/ASCII" title="ASCII">ASCII</a>'s <a href="/wiki/C0_controls" class="mw-redirect" title="C0 controls">C0 controls</a> (i.e. have Unicode code points up to <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced">0x1F</span>). The three newline characters outside of this range—<link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced">NEL</span>, <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced">LS</span> and <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced">PS</span>—are often not recognized as newlines by software. For example: </p> <ul><li><a href="/wiki/JSON" title="JSON">JSON</a> recognizes <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced">CR</span> and <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced">LF</span> as whitespace, but not any other newline characters.<sup id="cite_ref-10" class="reference"><a href="#cite_note-10"><span class="cite-bracket">[</span>10<span class="cite-bracket">]</span></a></sup> C0 controls cannot appear unescaped within strings, but any other line break characters can.<sup id="cite_ref-11" class="reference"><a href="#cite_note-11"><span class="cite-bracket">[</span>11<span class="cite-bracket">]</span></a></sup></li> <li><a href="/wiki/ECMAScript" title="ECMAScript">ECMAScript</a> only recognizes <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced">CR</span>, <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced">LF</span>, <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced">LS</span> and <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced">PS</span> as line terminators.<sup id="cite_ref-ES_2019_12-0" class="reference"><a href="#cite_note-ES_2019-12"><span class="cite-bracket">[</span>12<span class="cite-bracket">]</span></a></sup> Historically, unescaped line terminators were not permitted in string literals,<sup id="cite_ref-13" class="reference"><a href="#cite_note-13"><span class="cite-bracket">[</span>13<span class="cite-bracket">]</span></a></sup> but this was changed in <a href="/wiki/ECMAScript#ES2019" title="ECMAScript">ES2019</a> to allow unescaped <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced">LS</span> and <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced">PS</span> in strings<sup id="cite_ref-ES_2019_12-1" class="reference"><a href="#cite_note-ES_2019-12"><span class="cite-bracket">[</span>12<span class="cite-bracket">]</span></a></sup> for compatibility with JSON.<sup id="cite_ref-14" class="reference"><a href="#cite_note-14"><span class="cite-bracket">[</span>14<span class="cite-bracket">]</span></a></sup></li> <li><a href="/wiki/YAML" title="YAML">YAML</a> 1.1 recognized all three as line breaks; YAML 1.2 no longer recognizes them as line breaks in order to be compatible with <a href="/wiki/JSON" title="JSON">JSON</a>.<sup id="cite_ref-15" class="reference"><a href="#cite_note-15"><span class="cite-bracket">[</span>15<span class="cite-bracket">]</span></a></sup></li> <li><a href="/wiki/Windows_Notepad" title="Windows Notepad">Windows Notepad</a>, the default <a href="/wiki/Text_editor" title="Text editor">text editor</a> of <a href="/wiki/Microsoft_Windows" title="Microsoft Windows">Microsoft Windows</a>, does not treat any of <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced">NEL</span>, <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced">LS</span>, or <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced">PS</span> as line breaks.</li> <li><a href="/wiki/Gedit" title="Gedit">gedit</a>, the default <a href="/wiki/Text_editor" title="Text editor">text editor</a> of the <a href="/wiki/GNOME" title="GNOME">GNOME</a> <a href="/wiki/Desktop_environment" title="Desktop environment">desktop environment</a>, treats <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced">LS</span> and <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced">PS</span> as line breaks, but not <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced">NEL</span>.</li></ul> <p>Unicode includes some <a href="/wiki/Glyph" title="Glyph">glyphs</a> intended for presenting a user-visible character to the reader of the document, and are thus not recognized themselves as a newline: </p> <ul><li><span class="nowrap"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced">U+23CE</span> </span><span style="font-size:125%;line-height:1em">⏎</span> <span style="font-variant: small-caps; text-transform: lowercase; font-feature-settings: 'onum'">RETURN SYMBOL</span></li> <li><span class="nowrap"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced">U+240A</span> </span><span style="font-size:125%;line-height:1em">␊</span> <span style="font-variant: small-caps; text-transform: lowercase; font-feature-settings: 'onum'">SYMBOL FOR LINE FEED</span></li> <li><span class="nowrap"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced">U+240D</span> </span><span style="font-size:125%;line-height:1em">␍</span> <span style="font-variant: small-caps; text-transform: lowercase; font-feature-settings: 'onum'">SYMBOL FOR CARRIAGE RETURN</span></li> <li><span class="nowrap"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced">U+2424</span> </span><span style="font-size:125%;line-height:1em">␤</span> <span style="font-variant: small-caps; text-transform: lowercase; font-feature-settings: 'onum'">SYMBOL FOR NEWLINE</span></li></ul> <div class="mw-heading mw-heading3"><h3 id="In_programming_languages">In programming languages</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Newline&action=edit&section=5" title="Edit section: In programming languages"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1236090951" /><div role="note" class="hatnote navigation-not-searchable">"\n" redirects here. For the similar number notation, see <a href="/wiki/%5Cnnn_(disambiguation)" class="mw-redirect mw-disambig" title="\nnn (disambiguation)">\nnn (disambiguation)</a>.</div> <p>To facilitate creating <a href="/wiki/Porting" title="Porting">portable</a> programs, <a href="/wiki/Programming_language" title="Programming language">programming languages</a> provide some abstractions to deal with the different types of newline sequences used in different environments. </p><p>The <a href="/wiki/C_(programming_language)" title="C (programming language)">C language</a> provides the <a href="/wiki/Escape_sequence" title="Escape sequence">escape sequences</a> <code>\n</code> (newline) and <code>\r</code> (carriage return). However, these are not required to be equivalent to the ASCII <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced">LF</span> and <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced">CR</span> control characters. The C standard only guarantees two traits: </p> <ol><li>Each of these escape sequences maps to a unique implementation-defined number that can be stored in one <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced">char</span> value.</li> <li>When writing to a file, device node, or socket/fifo in <i>text mode</i>, <code>\n</code> is transparently translated to the native newline sequence used by the system, which may be longer than one character. When reading in text mode, the native newline sequence is translated back to <code>\n</code>. In <i>binary mode</i>, no translation is performed, and the internal representation produced by <code>\n</code> is output directly.</li></ol> <p>On <a href="/wiki/Unix" title="Unix">Unix</a> <a href="/wiki/Operating_system" title="Operating system">operating system</a> platforms, where C originated, the native newline sequence is ASCII <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced">LF</span> (<link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced">0x0A</span>), so <code>\n</code> was simply defined to be that value. With the internal and external representation being identical, the translation performed in text mode is a <a href="/wiki/NOP_(code)" title="NOP (code)">no-op</a>, and Unix has no notion of text mode or binary mode. This has caused many programmers who developed their software on Unix systems simply to ignore the distinction completely, resulting in code that is not portable to different platforms. </p><p>The <a href="/wiki/C_standard_library" title="C standard library">C standard library</a> function <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced"><a href="/wiki/Fgets" class="mw-redirect" title="Fgets">fgets</a>()</span> is best avoided in binary mode because any file not written with the Unix newline convention will be misread. Also, in text mode, any file not written with the system's native newline sequence (such as a file created on a Unix system, then copied to a Windows system) will be misread as well. </p><p>Another common problem is the use of <code>\n</code> when communicating using an Internet protocol that mandates the use of ASCII <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced">CR</span>+<link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced">LF</span> for ending lines. Writing <code>\n</code> to a text mode stream works correctly on Windows systems, but produces only <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced">LF</span> on Unix, and something completely different on more exotic systems. Using <code>\r\n</code> in binary mode is slightly better. </p><p>Many languages, such as <a href="/wiki/C%2B%2B" title="C++">C++</a>, <a href="/wiki/Perl" title="Perl">Perl</a>,<sup id="cite_ref-16" class="reference"><a href="#cite_note-16"><span class="cite-bracket">[</span>16<span class="cite-bracket">]</span></a></sup> and <a href="/wiki/Haskell" title="Haskell">Haskell</a> provide the same interpretation of <code>\n</code> as C. C++ has an <a href="/wiki/Input/output_(C%2B%2B)" title="Input/output (C++)">alternative input/output (I/O) model</a> where the manipulator <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced">std::endl</span> can be used to output a newline (and flushes the stream buffer). </p><p><a href="/wiki/Java_(programming_language)" title="Java (programming language)">Java</a>, <a href="/wiki/PHP" title="PHP">PHP</a>,<sup id="cite_ref-17" class="reference"><a href="#cite_note-17"><span class="cite-bracket">[</span>17<span class="cite-bracket">]</span></a></sup> and <a href="/wiki/Python_(programming_language)" title="Python (programming language)">Python</a><sup id="cite_ref-18" class="reference"><a href="#cite_note-18"><span class="cite-bracket">[</span>18<span class="cite-bracket">]</span></a></sup> provide the <code>\r\n</code> sequence (for ASCII <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced">CR</span>+<link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced">LF</span>). In contrast to C, these are guaranteed to represent the values <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced">U+000D</span> and <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced">U+000A</span>, respectively. </p><p>The <a href="/wiki/Java_Class_Library" title="Java Class Library">Java Class Library</a> <a href="/wiki/Input/output" title="Input/output">input/output</a> (I/O) methods do not transparently translate these into platform-dependent newline sequences on input or output. Instead, they provide functions for writing a full line that automatically add the native newline sequence, and functions for reading lines that accept any of <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced">CR</span>, <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced">LF</span>, or <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced">CR</span>+<link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced">LF</span> as a line terminator (see <a rel="nofollow" class="external text" href="http://download.oracle.com/javase/6/docs/api/java/io/BufferedReader.html#readLine%28%29"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced">BufferedReader.readLine()</span></a>). The <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced"><a rel="nofollow" class="external text" href="http://docs.oracle.com/javase/8/docs/api/java/lang/System.html#lineSeparator--">System.lineSeparator()</a></span> method can be used to retrieve the underlying line separator. </p><p>Example: </p> <div class="mw-highlight mw-highlight-lang-java mw-content-ltr" dir="ltr"><pre><span></span><span class="w"> </span><span class="n">String</span><span class="w"> </span><span class="n">eol</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">System</span><span class="p">.</span><span class="na">lineSeparator</span><span class="p">();</span> <span class="w"> </span><span class="n">String</span><span class="w"> </span><span class="n">lineColor</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">"Color: Red"</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">eol</span><span class="p">;</span> </pre></div> <p>Python permits "Universal Newline Support" when opening a file for reading, when importing modules, and when executing a file.<sup id="cite_ref-19" class="reference"><a href="#cite_note-19"><span class="cite-bracket">[</span>19<span class="cite-bracket">]</span></a></sup> </p><p>Some languages have created special <a href="/wiki/Variable_(computer_science)" title="Variable (computer science)">variables</a>, <a href="/wiki/Constant_(computer_programming)" title="Constant (computer programming)">constants</a>, and <a href="/wiki/Subroutine" class="mw-redirect" title="Subroutine">subroutines</a> to facilitate newlines during program execution. In some languages such as <a href="/wiki/PHP" title="PHP">PHP</a> and <a href="/wiki/Perl" title="Perl">Perl</a>, <a href="/wiki/Double_quotes" class="mw-redirect" title="Double quotes">double quotes</a> are required to perform escape substitution for all escape sequences, including <code>\n</code> and <code>\r</code>. In PHP, to avoid portability problems, newline sequences should be issued using the PHP_EOL constant.<sup id="cite_ref-20" class="reference"><a href="#cite_note-20"><span class="cite-bracket">[</span>20<span class="cite-bracket">]</span></a></sup> </p><p>Example in <a href="/wiki/C_Sharp_(programming_language)" title="C Sharp (programming language)">C#</a>: </p> <div class="mw-highlight mw-highlight-lang-c# mw-content-ltr" dir="ltr"><pre><span></span><span class="w"> </span><span class="kt">string</span><span class="w"> </span><span class="n">eol</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">Environment</span><span class="p">.</span><span class="n">NewLine</span><span class="p">;</span> <span class="w"> </span><span class="kt">string</span><span class="w"> </span><span class="n">lineColor</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">"Color: Red"</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">eol</span><span class="p">;</span> <span class="w"> </span> <span class="w"> </span><span class="kt">string</span><span class="w"> </span><span class="n">eol2</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">"\n"</span><span class="p">;</span> <span class="w"> </span><span class="kt">string</span><span class="w"> </span><span class="n">lineColor2</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">"Color: Blue"</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">eol2</span><span class="p">;</span> </pre></div> <div class="mw-heading mw-heading3"><h3 id="Issues_with_different_newline_formats">Issues with different newline formats</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Newline&action=edit&section=6" title="Edit section: Issues with different newline formats"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <figure typeof="mw:File/Thumb"><a href="/wiki/File:Newline_hex_0A.png" class="mw-file-description"><img src="//upload.wikimedia.org/wikipedia/commons/thumb/2/27/Newline_hex_0A.png/300px-Newline_hex_0A.png" decoding="async" width="300" height="172" class="mw-file-element" srcset="//upload.wikimedia.org/wikipedia/commons/thumb/2/27/Newline_hex_0A.png/450px-Newline_hex_0A.png 1.5x, //upload.wikimedia.org/wikipedia/commons/thumb/2/27/Newline_hex_0A.png/600px-Newline_hex_0A.png 2x" data-file-width="832" data-file-height="478" /></a><figcaption>A <a href="/wiki/Text_file" title="Text file">text file</a> created with <a href="/wiki/Gedit" title="Gedit">gedit</a> and viewed with a <a href="/wiki/Hex_editor" title="Hex editor">hex editor</a>. Besides the text objects, there are only EOL markers with the <a href="/wiki/Hexadecimal" title="Hexadecimal">hexadecimal</a> value 0A.</figcaption></figure> <p>The different newline conventions cause text files that have been transferred between systems of different types to be displayed incorrectly. </p><p>Text in files created with programs which are common on <a href="/wiki/Unix-like" title="Unix-like">Unix-like</a> or <a href="/wiki/Classic_Mac_OS" title="Classic Mac OS">classic Mac OS</a>, appear as a single long line on most programs common to <a href="/wiki/MS-DOS" title="MS-DOS">MS-DOS</a> and <a href="/wiki/Microsoft_Windows" title="Microsoft Windows">Microsoft Windows</a> because these do not display a single <code class="mw-highlight mw-highlight-lang-text mw-content-ltr" style="" dir="ltr">line feed</code> or a single <code class="mw-highlight mw-highlight-lang-text mw-content-ltr" style="" dir="ltr">carriage return</code> as a line break. </p><p>Conversely, when viewing a file originating from a Windows computer on a Unix-like system, the extra <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced">CR</span> may be displayed as a second line break, as <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced">^M</span>, or as <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced"><cr></span> at the end of each line. </p><p>Furthermore, programs other than text editors may not accept a file, e.g. some configuration file, encoded using the foreign newline convention, as a valid file. </p><p>The problem can be hard to spot because some programs handle the foreign newlines properly while others do not. For example, a <a href="/wiki/Compiler" title="Compiler">compiler</a> may fail with obscure syntax errors even though the source file looks correct when displayed on the <a href="/wiki/Command-line_interface" title="Command-line interface">console</a> or in an <a href="/wiki/Text_editor" title="Text editor">editor</a>. Modern text editors generally recognize all flavours of <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced">CR</span>+<link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced">LF</span> newlines and allow users to convert between the different standards. <a href="/wiki/Web_browser" title="Web browser">Web browsers</a> are usually also capable of displaying text files and websites which use different types of newlines. </p><p>Even if a program supports different newline conventions, these features are often not sufficiently labeled, described, or documented. Typically a menu or combo-box enumerating different newline conventions will be displayed to users without an indication if the selection will re-interpret, temporarily convert, or permanently convert the newlines. Some programs will implicitly convert on open, copy, paste, or save—often inconsistently. </p><p>Most textual <a href="/wiki/Internet" title="Internet">Internet</a> <a href="/wiki/Protocol_(computing)" class="mw-redirect" title="Protocol (computing)">protocols</a> (including <a href="/wiki/HTTP" title="HTTP">HTTP</a>, <a href="/wiki/Simple_Mail_Transfer_Protocol" title="Simple Mail Transfer Protocol">SMTP</a>, <a href="/wiki/File_Transfer_Protocol" title="File Transfer Protocol">FTP</a>, <a href="/wiki/Internet_Relay_Chat" class="mw-redirect" title="Internet Relay Chat">IRC</a>, and many others) mandate the use of ASCII <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced">CR</span>+<link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced">LF</span> (<code>\r\n</code>, <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced">0x0D 0x0A</span>) on the protocol level, but recommend that tolerant applications recognize lone <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced">LF</span> (<code>\n</code>, <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced">0x0A</span>) as well. Despite the dictated standard, many applications erroneously use the <a href="/wiki/C_(programming_language)" title="C (programming language)">C</a> newline escape sequence <code>\n</code> (<link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced">LF</span>) instead of the correct combination of carriage return escape and newline escape sequences <code>\r\n</code> (<link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced">CR</span>+<link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced">LF</span>) (see section <a href="#In_programming_languages">Newline in programming languages</a> above). This accidental use of the wrong escape sequences leads to problems when trying to communicate with systems adhering to the stricter interpretation of the standards instead of the suggested tolerant interpretation. One such intolerant system is the <a href="/wiki/Qmail" title="Qmail">qmail</a> <a href="/wiki/Mail_transfer_agent" class="mw-redirect" title="Mail transfer agent">mail transfer agent</a> that actively refuses to accept messages from systems that send bare <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced">LF</span> instead of the required <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced">CR</span>+<link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced">LF</span>.<sup id="cite_ref-21" class="reference"><a href="#cite_note-21"><span class="cite-bracket">[</span>21<span class="cite-bracket">]</span></a></sup> </p><p>The standard Internet Message Format<sup id="cite_ref-22" class="reference"><a href="#cite_note-22"><span class="cite-bracket">[</span>22<span class="cite-bracket">]</span></a></sup> for email states: "CR and LF MUST only occur together as CRLF; they MUST NOT appear independently in the body". Differences between SMTP implementations in how they treat bare LF and/or bare CR characters have led to SMTP spoofing attacks referred to as "SMTP smuggling".<sup id="cite_ref-23" class="reference"><a href="#cite_note-23"><span class="cite-bracket">[</span>23<span class="cite-bracket">]</span></a></sup> </p><p>The <a href="/wiki/File_Transfer_Protocol" title="File Transfer Protocol">File Transfer Protocol</a> can automatically convert newlines in files being transferred between <a href="/wiki/Operating_system" title="Operating system">systems</a> with different newline representations when the transfer is done in "ASCII mode". However, transferring binary files in this mode usually has disastrous results: any occurrence of the newline byte sequence—which does not have line terminator semantics in this context, but is just part of a normal sequence of bytes—will be translated to whatever newline representation the other system uses, effectively <a href="/wiki/Data_corruption" title="Data corruption">corrupting</a> the file. FTP clients often employ some <a href="/wiki/Heuristic_(computer_science)" title="Heuristic (computer science)">heuristics</a> (for example, inspection of <a href="/wiki/Filename_extension" title="Filename extension">filename extensions</a>) to automatically select either binary or ASCII mode, but in the end it is up to users to make sure their files are transferred in the correct mode. If there is any doubt as to the correct mode, binary mode should be used, as then no files will be altered by FTP, though they may display incorrectly.<sup id="cite_ref-24" class="reference"><a href="#cite_note-24"><span class="cite-bracket">[</span>24<span class="cite-bracket">]</span></a></sup> </p> <div class="mw-heading mw-heading3"><h3 id="Conversion_between_newline_formats">Conversion between newline formats</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Newline&action=edit&section=7" title="Edit section: Conversion between newline formats"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p><a href="/wiki/Text_editor" title="Text editor">Text editors</a> are often used for converting a text file between different newline formats; most modern editors can read and write files using at least the different ASCII <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced">CR</span>/<link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced">LF</span> conventions. </p><p>For example, the editor <a href="/wiki/Vim_(text_editor)" title="Vim (text editor)">Vim</a> can make a file compatible with the Windows Notepad text editor. Within vim </p> <div class="mw-highlight mw-highlight-lang-vim mw-content-ltr" dir="ltr"><pre><span></span> :<span class="k">set</span> <span class="nb">fileformat</span><span class="p">=</span>dos  :<span class="k">wq</span> </pre></div> <p>Editors can be unsuitable for converting larger files or bulk conversion of many files. For larger files (on Windows NT) the following command is often used: </p> <div class="mw-highlight mw-highlight-lang-doscon mw-content-ltr" dir="ltr"><pre><span></span><span class="gp">D:\></span><span class="k">TYPE</span> unix_file <span class="p">|</span> FIND /V <span class="s2">""</span> <span class="p">></span> dos_file </pre></div> <p>Special purpose programs to convert files between different newline conventions include <a href="/wiki/Unix2dos" title="Unix2dos"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced">unix2dos</span> and <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced">dos2unix</span></a>, <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced">mac2unix</span> and <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced">unix2mac</span>, <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced">mac2dos</span> and <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced">dos2mac</span>, and <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced">flip</span>.<sup id="cite_ref-25" class="reference"><a href="#cite_note-25"><span class="cite-bracket">[</span>25<span class="cite-bracket">]</span></a></sup> The <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced"><a href="/wiki/Tr_(Unix)" title="Tr (Unix)">tr</a></span> command is available on virtually every <a href="/wiki/Unix-like" title="Unix-like">Unix-like</a> system and can be used to perform arbitrary replacement operations on single characters. A DOS/Windows text file can be converted to Unix format by simply removing all ASCII <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced">CR</span> characters with </p> <pre>$ <a href="/wiki/Tr_(Unix)" title="Tr (Unix)">tr</a> -d '\r' < <i>inputfile</i> > <i>outputfile</i> </pre> <p>or, if the text has only <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced">CR</span> newlines, by converting all <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced">CR</span> newlines to <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced">LF</span> with </p> <pre>$ <a href="/wiki/Tr_(Unix)" title="Tr (Unix)">tr</a> '\r' '\n' < <i>inputfile</i> > <i>outputfile</i> </pre> <p>The same tasks are sometimes performed with <a href="/wiki/Awk" class="mw-redirect" title="Awk">awk</a>, <a href="/wiki/Sed" title="Sed">sed</a>, or in <a href="/wiki/Perl" title="Perl">Perl</a> if the platform has a Perl interpreter: </p> <div class="mw-highlight mw-highlight-lang-console mw-content-ltr" dir="ltr"><pre><span></span><span class="gp">$ </span>awk<span class="w"> </span><span class="s1">'{sub("$","\r\n"); printf("%s",$0);}'</span><span class="w"> </span>inputfile<span class="w"> </span>><span class="w"> </span>outputfile<span class="w"> </span><span class="c1"># UNIX to DOS (adding CRs on Linux and BSD based OS that haven't GNU extensions)</span> <span class="gp">$ </span>awk<span class="w"> </span><span class="s1">'{gsub("\r",""); print;}'</span><span class="w"> </span>inputfile<span class="w"> </span>><span class="w"> </span>outputfile<span class="w"> </span><span class="c1"># DOS to UNIX (removing CRs on Linux and BSD based OS that haven't GNU extensions)</span> <span class="gp">$ </span>sed<span class="w"> </span>-e<span class="w"> </span><span class="s1">'s/$/\r/'</span><span class="w"> </span>inputfile<span class="w"> </span>><span class="w"> </span>outputfile<span class="w"> </span><span class="c1"># UNIX to DOS (adding CRs on Linux based OS that use GNU extensions)</span> <span class="gp">$ </span>sed<span class="w"> </span>-e<span class="w"> </span><span class="s1">'s/\r$//'</span><span class="w"> </span>inputfile<span class="w"> </span>><span class="w"> </span>outputfile<span class="w"> </span><span class="c1"># DOS to UNIX (removing CRs on Linux based OS that use GNU extensions)</span> <span class="gp">$ </span>perl<span class="w"> </span>-pe<span class="w"> </span><span class="s1">'s/\r?\n|\r/\r\n/g'</span><span class="w"> </span>inputfile<span class="w"> </span>><span class="w"> </span>outputfile<span class="w"> </span><span class="c1"># Convert to DOS</span> <span class="gp">$ </span>perl<span class="w"> </span>-pe<span class="w"> </span><span class="s1">'s/\r?\n|\r/\n/g'</span><span class="w"> </span>inputfile<span class="w"> </span>><span class="w"> </span>outputfile<span class="w"> </span><span class="c1"># Convert to UNIX</span> <span class="gp">$ </span>perl<span class="w"> </span>-pe<span class="w"> </span><span class="s1">'s/\r?\n|\r/\r/g'</span><span class="w"> </span>inputfile<span class="w"> </span>><span class="w"> </span>outputfile<span class="w"> </span><span class="c1"># Convert to old Mac</span> </pre></div> <p>The <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced"><a href="/wiki/File_(command)" title="File (command)">file</a></span> command can identify the type of line endings: </p> <div class="mw-highlight mw-highlight-lang-console mw-content-ltr" dir="ltr"><pre><span></span><span class="gp"> $ </span>file<span class="w"> </span>myfile.txt <span class="go"> myfile.txt: ASCII English text, with CRLF line terminators</span> </pre></div> <p>The Unix <a href="/wiki/Grep#Implementations" title="Grep">egrep</a> (extended grep) command can be used to print filenames of Unix or DOS files (assuming Unix and DOS-style files only, no classic Mac OS-style files): </p> <div class="mw-highlight mw-highlight-lang-console mw-content-ltr" dir="ltr"><pre><span></span><span class="gp">$ </span>egrep<span class="w"> </span>-L<span class="w"> </span><span class="s1">'\r\n'</span><span class="w"> </span>myfile.txt<span class="w"> </span><span class="c1"># show UNIX style file (LF terminated)</span> <span class="gp">$ </span>egrep<span class="w"> </span>-l<span class="w"> </span><span class="s1">'\r\n'</span><span class="w"> </span>myfile.txt<span class="w"> </span><span class="c1"># show DOS style file (CRLF terminated)</span> </pre></div> <p>Other tools permit the user to visualise the EOL characters: </p> <div class="mw-highlight mw-highlight-lang-console mw-content-ltr" dir="ltr"><pre><span></span><span class="gp">$ </span>od<span class="w"> </span>-a<span class="w"> </span>myfile.txt <span class="gp">$ </span>cat<span class="w"> </span>-e<span class="w"> </span>myfile.txt <span class="gp">$ </span>cat<span class="w"> </span>-v<span class="w"> </span>myfile.txt <span class="gp">$ </span>hexdump<span class="w"> </span>-c<span class="w"> </span>myfile.txt </pre></div> <div class="mw-heading mw-heading2"><h2 id="Interpretation">Interpretation</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Newline&action=edit&section=8" title="Edit section: Interpretation"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Two ways to view newlines, both of which are <a href="/wiki/Self-consistent" class="mw-redirect" title="Self-consistent">self-consistent</a>, are that newlines either <i>separate</i> lines or that they <i>terminate</i> lines. If a newline is considered a separator, there will be no newline after the last line of a file. Some programs have problems processing the last line of a file if it is not terminated by a newline. On the other hand, programs that expect newline to be used as a separator will interpret a final newline as starting a new (empty) line. Conversely, if a newline is considered a terminator, all text lines including the last are expected to be terminated by a newline. If the final character sequence in a text file is not a newline, the final line of the file may be considered to be an improper or incomplete text line, or the file may be considered to be improperly truncated. </p><p>In text intended primarily to be read by humans using software which implements the <a href="/wiki/Word_wrap" class="mw-redirect" title="Word wrap">word wrap</a> feature, a newline character typically only needs to be stored if a line break is required independent of whether the next word would fit on the same line, such as between <a href="/wiki/Paragraph" title="Paragraph">paragraphs</a> and in vertical lists. Therefore, in the logic of <a href="/wiki/Word_processor" title="Word processor">word processing</a> and most <a href="/wiki/Text_editor" title="Text editor">text editors</a>, newline is used as a <i>paragraph break</i> and is known as a "hard return", in contrast to "soft returns" which are dynamically created to implement word wrapping and are changeable with each display instance. In many applications a separate <a href="/wiki/Control_character" title="Control character">control character</a> called "manual line break" exists for forcing line breaks inside a single paragraph. The <a href="/wiki/Glyph" title="Glyph">glyph</a> for the control character for a hard return is usually a <a href="/wiki/Pilcrow" title="Pilcrow">pilcrow</a> (¶), and for the manual line break is usually a carriage return arrow (↵). </p> <div class="mw-heading mw-heading2"><h2 id="Reverse_and_partial_line_feeds">Reverse and partial line feeds</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Newline&action=edit&section=9" title="Edit section: Reverse and partial line feeds"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced">RI</span> (<a href="/wiki/Unicode" title="Unicode">U</a>+008D <a href="/wiki/Line_starve" title="Line starve">REVERSE LINE FEED</a>,<sup id="cite_ref-26" class="reference"><a href="#cite_note-26"><span class="cite-bracket">[</span>26<span class="cite-bracket">]</span></a></sup> <a href="/wiki/ISO/IEC_6429" class="mw-redirect" title="ISO/IEC 6429">ISO/IEC 6429</a> 8D, decimal 141) is used to move the printing position back one line (by reverse feeding the paper, or by moving a display cursor up one line) so that other characters may be printed over existing text. This may be done to make them bolder, or to add underlines, strike-throughs or other characters such as <a href="/wiki/Diacritic" title="Diacritic">diacritics</a>. </p><p>Similarly, <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced">PLD</span> (<a href="/wiki/Unicode" title="Unicode">U</a>+008B PARTIAL LINE FORWARD, decimal 139) and <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced">PLU</span> (<a href="/wiki/Unicode" title="Unicode">U</a>+008C PARTIAL LINE BACKWARD, decimal 140) can be used to advance or reverse the text printing position by some fraction of the vertical line spacing (typically, half). These can be used in combination for subscripts (by advancing and then reversing) and superscripts (by reversing and then advancing), and may also be useful for printing diacritics. </p> <div class="mw-heading mw-heading2"><h2 id="See_also">See also</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Newline&action=edit&section=10" title="Edit section: See also"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <ul><li><a href="/wiki/End-of-file" title="End-of-file">End-of-file</a></li> <li><a href="/wiki/Enter_key" title="Enter key">Enter key</a></li> <li><a href="/wiki/Page_break" title="Page break">Page break</a></li></ul> <div class="mw-heading mw-heading2"><h2 id="References">References</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Newline&action=edit&section=11" title="Edit section: References"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <style data-mw-deduplicate="TemplateStyles:r1239543626">.mw-parser-output .reflist{margin-bottom:0.5em;list-style-type:decimal}@media screen{.mw-parser-output .reflist{font-size:90%}}.mw-parser-output .reflist .references{font-size:100%;margin-bottom:0;list-style-type:inherit}.mw-parser-output .reflist-columns-2{column-width:30em}.mw-parser-output .reflist-columns-3{column-width:25em}.mw-parser-output .reflist-columns{margin-top:0.3em}.mw-parser-output .reflist-columns ol{margin-top:0}.mw-parser-output .reflist-columns li{page-break-inside:avoid;break-inside:avoid-column}.mw-parser-output .reflist-upper-alpha{list-style-type:upper-alpha}.mw-parser-output .reflist-upper-roman{list-style-type:upper-roman}.mw-parser-output .reflist-lower-alpha{list-style-type:lower-alpha}.mw-parser-output .reflist-lower-greek{list-style-type:lower-greek}.mw-parser-output .reflist-lower-roman{list-style-type:lower-roman}</style><div class="reflist reflist-columns references-column-width" style="column-width: 30em;"> <ol class="references"> <li id="cite_note-1"><span class="mw-cite-backlink"><b><a href="#cite_ref-1">^</a></b></span> <span class="reference-text"><style data-mw-deduplicate="TemplateStyles:r1238218222">.mw-parser-output cite.citation{font-style:inherit;word-wrap:break-word}.mw-parser-output .citation q{quotes:"\"""\"""'""'"}.mw-parser-output .citation:target{background-color:rgba(0,127,255,0.133)}.mw-parser-output .id-lock-free.id-lock-free a{background:url("//upload.wikimedia.org/wikipedia/commons/6/65/Lock-green.svg")right 0.1em center/9px no-repeat}.mw-parser-output .id-lock-limited.id-lock-limited a,.mw-parser-output .id-lock-registration.id-lock-registration a{background:url("//upload.wikimedia.org/wikipedia/commons/d/d6/Lock-gray-alt-2.svg")right 0.1em center/9px no-repeat}.mw-parser-output .id-lock-subscription.id-lock-subscription a{background:url("//upload.wikimedia.org/wikipedia/commons/a/aa/Lock-red-alt-2.svg")right 0.1em center/9px no-repeat}.mw-parser-output .cs1-ws-icon a{background:url("//upload.wikimedia.org/wikipedia/commons/4/4c/Wikisource-logo.svg")right 0.1em center/12px no-repeat}body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-free a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-limited a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-registration a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-subscription a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .cs1-ws-icon a{background-size:contain;padding:0 1em 0 0}.mw-parser-output .cs1-code{color:inherit;background:inherit;border:none;padding:inherit}.mw-parser-output .cs1-hidden-error{display:none;color:var(--color-error,#d33)}.mw-parser-output .cs1-visible-error{color:var(--color-error,#d33)}.mw-parser-output .cs1-maint{display:none;color:#085;margin-left:0.3em}.mw-parser-output .cs1-kern-left{padding-left:0.2em}.mw-parser-output .cs1-kern-right{padding-right:0.2em}.mw-parser-output .citation .mw-selflink{font-weight:inherit}@media screen{.mw-parser-output .cs1-format{font-size:95%}html.skin-theme-clientpref-night .mw-parser-output .cs1-maint{color:#18911f}}@media screen and (prefers-color-scheme:dark){html.skin-theme-clientpref-os .mw-parser-output .cs1-maint{color:#18911f}}</style><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://www.computerhope.com/jargon/n/newline.htm">"What is a Newline?"</a>. <i>www.computerhope.com</i><span class="reference-accessdate">. Retrieved <span class="nowrap">10 May</span> 2021</span>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=unknown&rft.jtitle=www.computerhope.com&rft.atitle=What+is+a+Newline%3F&rft_id=https%3A%2F%2Fwww.computerhope.com%2Fjargon%2Fn%2Fnewline.htm&rfr_id=info%3Asid%2Fen.wikipedia.org%3ANewline" class="Z3988"></span></span> </li> <li id="cite_note-2"><span class="mw-cite-backlink"><b><a href="#cite_ref-2">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222" /><cite id="CITEREFQualline2001" class="citation book cs1">Qualline, Steve (2001). <a rel="nofollow" class="external text" href="https://web.archive.org/web/20220408110814/http://ftp.vim.org/pub/vim/doc/book/vimbook-OPL.pdf"><i>Vi Improved - Vim</i></a> <span class="cs1-format">(PDF)</span>. <a href="/wiki/Sams_Publishing" title="Sams Publishing">Sams Publishing</a>. p. <a rel="nofollow" class="external text" href="http://ftp.vim.org/pub/vim/doc/book/vimbook-OPL.pdf#page=120">120</a>. <a href="/wiki/ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a> <a href="/wiki/Special:BookSources/9780735710016" title="Special:BookSources/9780735710016"><bdi>9780735710016</bdi></a>. Archived from <a rel="nofollow" class="external text" href="http://ftp.vim.org/pub/vim/doc/book/vimbook-OPL.pdf">the original</a> <span class="cs1-format">(PDF)</span> on 8 April 2022<span class="reference-accessdate">. Retrieved <span class="nowrap">4 January</span> 2023</span>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=book&rft.btitle=Vi+Improved+-+Vim&rft.pages=120&rft.pub=Sams+Publishing&rft.date=2001&rft.isbn=9780735710016&rft.aulast=Qualline&rft.aufirst=Steve&rft_id=http%3A%2F%2Fftp.vim.org%2Fpub%2Fvim%2Fdoc%2Fbook%2Fvimbook-OPL.pdf&rfr_id=info%3Asid%2Fen.wikipedia.org%3ANewline" class="Z3988"></span></span> </li> <li id="cite_note-3"><span class="mw-cite-backlink"><b><a href="#cite_ref-3">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222" /><cite id="CITEREFDuckett" class="citation news cs1">Duckett, Chris. <a rel="nofollow" class="external text" href="https://web.archive.org/web/20180513055845/https://www.zdnet.com/article/windows-notepad-finally-understands-everyone-elses-end-of-line-characters/">"Windows Notepad finally understands everyone else's end of line characters"</a>. <a href="/wiki/ZDNet" class="mw-redirect" title="ZDNet">ZDNet</a>. Archived from <a rel="nofollow" class="external text" href="https://www.zdnet.com/article/windows-notepad-finally-understands-everyone-elses-end-of-line-characters/">the original</a> on 13 May 2018<span class="reference-accessdate">. Retrieved <span class="nowrap">4 January</span> 2023</span>. <q>[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.</q></cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=article&rft.atitle=Windows+Notepad+finally+understands+everyone+else%27s+end+of+line+characters&rft.aulast=Duckett&rft.aufirst=Chris&rft_id=https%3A%2F%2Fwww.zdnet.com%2Farticle%2Fwindows-notepad-finally-understands-everyone-elses-end-of-line-characters%2F&rfr_id=info%3Asid%2Fen.wikipedia.org%3ANewline" class="Z3988"></span></span> </li> <li id="cite_note-4"><span class="mw-cite-backlink"><b><a href="#cite_ref-4">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222" /><cite id="CITEREFLopez2018" class="citation web cs1">Lopez, Michel (8 May 2018). <a rel="nofollow" class="external text" href="https://web.archive.org/web/20190406132933/https://devblogs.microsoft.com/commandline/extended-eol-in-notepad/">"Introducing extended line endings support in Notepad"</a>. <i>Windows Command Line</i>. Archived from <a rel="nofollow" class="external text" href="https://devblogs.microsoft.com/commandline/extended-eol-in-notepad/">the original</a> on 6 April 2019<span class="reference-accessdate">. Retrieved <span class="nowrap">4 January</span> 2023</span>. <q>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</q></cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=unknown&rft.jtitle=Windows+Command+Line&rft.atitle=Introducing+extended+line+endings+support+in+Notepad&rft.date=2018-05-08&rft.aulast=Lopez&rft.aufirst=Michel&rft_id=https%3A%2F%2Fdevblogs.microsoft.com%2Fcommandline%2Fextended-eol-in-notepad%2F&rfr_id=info%3Asid%2Fen.wikipedia.org%3ANewline" class="Z3988"></span></span> </li> <li id="cite_note-5"><span class="mw-cite-backlink"><b><a href="#cite_ref-5">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222" /><cite id="CITEREFKahn-Greene" class="citation web cs1">Kahn-Greene, Will Guaraldi. <a rel="nofollow" class="external text" href="https://www.bluesock.org/~willg/dev/ascii.html">"ASCII chart"</a>. <i>bluesock.org</i>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=unknown&rft.jtitle=bluesock.org&rft.atitle=ASCII+chart&rft.aulast=Kahn-Greene&rft.aufirst=Will+Guaraldi&rft_id=https%3A%2F%2Fwww.bluesock.org%2F~willg%2Fdev%2Fascii.html&rfr_id=info%3Asid%2Fen.wikipedia.org%3ANewline" class="Z3988"></span></span> </li> <li id="cite_note-6"><span class="mw-cite-backlink"><b><a href="#cite_ref-6">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222" /><cite id="CITEREFBrayDickensHolmes1983" class="citation book cs1">Bray, Andrew C.; Dickens, Adrian C.; Holmes, Mark A. (1983). <a rel="nofollow" class="external text" href="http://stardot.org.uk/mirrors/www.bbcdocs.com/filebase/essentials/BBC%20Microcomputer%20Advanced%20User%20Guide.pdf"><i>The Advanced User Guide for the BBC Microcomputer</i></a> <span class="cs1-format">(PDF)</span>. Cambridge Microcomputer Centre. pp. 103, 104. <a href="/wiki/ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a> <a href="/wiki/Special:BookSources/978-0946827008" title="Special:BookSources/978-0946827008"><bdi>978-0946827008</bdi></a><span class="reference-accessdate">. Retrieved <span class="nowrap">30 January</span> 2019</span>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=book&rft.btitle=The+Advanced+User+Guide+for+the+BBC+Microcomputer&rft.pages=103%2C+104&rft.pub=Cambridge+Microcomputer+Centre&rft.date=1983&rft.isbn=978-0946827008&rft.aulast=Bray&rft.aufirst=Andrew+C.&rft.au=Dickens%2C+Adrian+C.&rft.au=Holmes%2C+Mark+A.&rft_id=http%3A%2F%2Fstardot.org.uk%2Fmirrors%2Fwww.bbcdocs.com%2Ffilebase%2Fessentials%2FBBC%2520Microcomputer%2520Advanced%2520User%2520Guide.pdf&rfr_id=info%3Asid%2Fen.wikipedia.org%3ANewline" class="Z3988"></span></span> </li> <li id="cite_note-7"><span class="mw-cite-backlink"><b><a href="#cite_ref-7">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222" /><cite class="citation web cs1"><a rel="nofollow" class="external text" href="http://www.riscos.com/support/developers/prm/charoutput.html#66036">"Character Output"</a>. <i>RISC OS 3 Programmers' Reference Manual</i>. 3QD Developments Ltd. 3 November 2015<span class="reference-accessdate">. Retrieved <span class="nowrap">18 July</span> 2018</span>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=unknown&rft.jtitle=RISC+OS+3+Programmers%27+Reference+Manual&rft.atitle=Character+Output&rft.date=2015-11-03&rft_id=http%3A%2F%2Fwww.riscos.com%2Fsupport%2Fdevelopers%2Fprm%2Fcharoutput.html%2366036&rfr_id=info%3Asid%2Fen.wikipedia.org%3ANewline" class="Z3988"></span></span> </li> <li id="cite_note-8"><span class="mw-cite-backlink"><b><a href="#cite_ref-8">^</a></b></span> <span class="reference-text">IBM System/360 Reference Data Card, Publication GX20-1703, IBM Data Processing Division, White Plains, NY</span> </li> <li id="cite_note-9"><span class="mw-cite-backlink"><b><a href="#cite_ref-9">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222" /><cite id="CITEREFHeninger2013" class="citation web cs1">Heninger, Andy (20 September 2013). <a rel="nofollow" class="external text" href="https://www.unicode.org/reports/tr14/tr14-32.html">"UAX #14: Unicode Line Breaking Algorithm"</a>. The Unicode Consortium.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=unknown&rft.btitle=UAX+%2314%3A+Unicode+Line+Breaking+Algorithm&rft.pub=The+Unicode+Consortium&rft.date=2013-09-20&rft.aulast=Heninger&rft.aufirst=Andy&rft_id=https%3A%2F%2Fwww.unicode.org%2Freports%2Ftr14%2Ftr14-32.html&rfr_id=info%3Asid%2Fen.wikipedia.org%3ANewline" class="Z3988"></span></span> </li> <li id="cite_note-10"><span class="mw-cite-backlink"><b><a href="#cite_ref-10">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222" /><cite id="CITEREFBray2014" class="citation cs1">Bray, Tim (March 2014). <a rel="nofollow" class="external text" href="https://datatracker.ietf.org/doc/html/rfc7159#section-2">"JSON Grammar"</a>. <a rel="nofollow" class="external text" href="https://datatracker.ietf.org/doc/html/rfc7159"><i>The JavaScript Object Notation (JSON) Data Interchange Format</i></a>. sec. 2. <a href="/wiki/Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<span class="id-lock-free" title="Freely accessible"><a rel="nofollow" class="external text" href="https://doi.org/10.17487%2FRFC7159">10.17487/RFC7159</a></span>. <a href="/wiki/Request_for_Comments" title="Request for Comments">RFC</a> <a rel="nofollow" class="external text" href="https://datatracker.ietf.org/doc/html/rfc7159">7159</a>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=bookitem&rft.atitle=JSON+Grammar&rft.btitle=The+JavaScript+Object+Notation+%28JSON%29+Data+Interchange+Format&rft.pages=sec.-2&rft.date=2014-03&rft_id=info%3Adoi%2F10.17487%2FRFC7159&rft.aulast=Bray&rft.aufirst=Tim&rft_id=https%3A%2F%2Fdatatracker.ietf.org%2Fdoc%2Fhtml%2Frfc7159%26%23035%3Bsection-2&rfr_id=info%3Asid%2Fen.wikipedia.org%3ANewline" class="Z3988"></span></span> </li> <li id="cite_note-11"><span class="mw-cite-backlink"><b><a href="#cite_ref-11">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222" /><cite id="CITEREFBray2014" class="citation cs1">Bray, Tim (March 2014). <a rel="nofollow" class="external text" href="https://datatracker.ietf.org/doc/html/rfc7159#section-7">"Strings"</a>. <a rel="nofollow" class="external text" href="https://datatracker.ietf.org/doc/html/rfc7159"><i>The JavaScript Object Notation (JSON) Data Interchange Format</i></a>. sec. 7. <a href="/wiki/Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<span class="id-lock-free" title="Freely accessible"><a rel="nofollow" class="external text" href="https://doi.org/10.17487%2FRFC7159">10.17487/RFC7159</a></span>. <a href="/wiki/Request_for_Comments" title="Request for Comments">RFC</a> <a rel="nofollow" class="external text" href="https://datatracker.ietf.org/doc/html/rfc7159">7159</a>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=bookitem&rft.atitle=Strings&rft.btitle=The+JavaScript+Object+Notation+%28JSON%29+Data+Interchange+Format&rft.pages=sec.-7&rft.date=2014-03&rft_id=info%3Adoi%2F10.17487%2FRFC7159&rft.aulast=Bray&rft.aufirst=Tim&rft_id=https%3A%2F%2Fdatatracker.ietf.org%2Fdoc%2Fhtml%2Frfc7159%26%23035%3Bsection-7&rfr_id=info%3Asid%2Fen.wikipedia.org%3ANewline" class="Z3988"></span></span> </li> <li id="cite_note-ES_2019-12"><span class="mw-cite-backlink">^ <a href="#cite_ref-ES_2019_12-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-ES_2019_12-1"><sup><i><b>b</b></i></sup></a></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222" /><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://www.ecma-international.org/ecma-262/10.0/">"ECMAScript 2019 Language Specification"</a>. ECMA International. June 2019. <a rel="nofollow" class="external text" href="https://www.ecma-international.org/ecma-262/10.0/#sec-line-terminators">11.3 Line Terminators</a>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=unknown&rft.btitle=ECMAScript+2019+Language+Specification&rft.pages=11.3+Line+Terminators&rft.pub=ECMA+International&rft.date=2019-06&rft_id=https%3A%2F%2Fwww.ecma-international.org%2Fecma-262%2F10.0%2F&rfr_id=info%3Asid%2Fen.wikipedia.org%3ANewline" class="Z3988"></span></span> </li> <li id="cite_note-13"><span class="mw-cite-backlink"><b><a href="#cite_ref-13">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222" /><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://www.ecma-international.org/ecma-262/9.0/">"ECMAScript 2019 Language Specification"</a>. ECMA International. June 2018. <a rel="nofollow" class="external text" href="https://www.ecma-international.org/ecma-262/9.0/#sec-line-terminators">11.3 Line Terminators</a>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=unknown&rft.btitle=ECMAScript+2019+Language+Specification&rft.pages=11.3+Line+Terminators&rft.pub=ECMA+International&rft.date=2018-06&rft_id=https%3A%2F%2Fwww.ecma-international.org%2Fecma-262%2F9.0%2F&rfr_id=info%3Asid%2Fen.wikipedia.org%3ANewline" class="Z3988"></span></span> </li> <li id="cite_note-14"><span class="mw-cite-backlink"><b><a href="#cite_ref-14">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222" /><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://github.com/tc39/proposal-json-superset">"Subsume JSON (a.k.a. JSON ⊂ ECMAScript)"</a>. <i>GitHub</i>. 22 May 2018.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=unknown&rft.jtitle=GitHub&rft.atitle=Subsume+JSON+%28a.k.a.+JSON+%E2%8A%82+ECMAScript%29&rft.date=2018-05-22&rft_id=https%3A%2F%2Fgithub.com%2Ftc39%2Fproposal-json-superset&rfr_id=info%3Asid%2Fen.wikipedia.org%3ANewline" class="Z3988"></span></span> </li> <li id="cite_note-15"><span class="mw-cite-backlink"><b><a href="#cite_ref-15">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222" /><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://yaml.org/spec/1.2/spec.html#id2774608">"5.4. Line Break Characters"</a>. <i>YAML Ain't Markup Language revision 1.2.2</i>. 1 October 2021.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=unknown&rft.jtitle=YAML+Ain%27t+Markup+Language+revision+1.2.2&rft.atitle=5.4.+Line+Break+Characters&rft.date=2021-10-01&rft_id=https%3A%2F%2Fyaml.org%2Fspec%2F1.2%2Fspec.html%23id2774608&rfr_id=info%3Asid%2Fen.wikipedia.org%3ANewline" class="Z3988"></span></span> </li> <li id="cite_note-16"><span class="mw-cite-backlink"><b><a href="#cite_ref-16">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222" /><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://perldoc.perl.org/functions/binmode">"binmode"</a>. <i>Perl documentation</i>. Perl 5 Porters.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=unknown&rft.jtitle=Perl+documentation&rft.atitle=binmode&rft_id=https%3A%2F%2Fperldoc.perl.org%2Ffunctions%2Fbinmode&rfr_id=info%3Asid%2Fen.wikipedia.org%3ANewline" class="Z3988"></span></span> </li> <li id="cite_note-17"><span class="mw-cite-backlink"><b><a href="#cite_ref-17">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222" /><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://www.php.net/manual/en/language.types.string.php#language.types.string.syntax.double">"PHP: Strings - Manual"</a>. <i>PHP Manual</i>. The PHP Group.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=unknown&rft.jtitle=PHP+Manual&rft.atitle=PHP%3A+Strings+-+Manual&rft_id=https%3A%2F%2Fwww.php.net%2Fmanual%2Fen%2Flanguage.types.string.php%23language.types.string.syntax.double&rfr_id=info%3Asid%2Fen.wikipedia.org%3ANewline" class="Z3988"></span></span> </li> <li id="cite_note-18"><span class="mw-cite-backlink"><b><a href="#cite_ref-18">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222" /><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://docs.python.org/3.11/reference/lexical_analysis.html#string-and-bytes-literals">"2. Lexical analysis"</a>. <i>The Python Language Reference</i>. The Python Foundation.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=unknown&rft.jtitle=The+Python+Language+Reference&rft.atitle=2.+Lexical+analysis&rft_id=https%3A%2F%2Fdocs.python.org%2F3.11%2Freference%2Flexical_analysis.html%23string-and-bytes-literals&rfr_id=info%3Asid%2Fen.wikipedia.org%3ANewline" class="Z3988"></span></span> </li> <li id="cite_note-19"><span class="mw-cite-backlink"><b><a href="#cite_ref-19">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222" /><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://www.python.org/download/releases/2.3/highlights/">"What's new in Python 2.3"</a>. Python Software Foundation.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=unknown&rft.btitle=What%27s+new+in+Python+2.3&rft.pub=Python+Software+Foundation&rft_id=https%3A%2F%2Fwww.python.org%2Fdownload%2Freleases%2F2.3%2Fhighlights%2F&rfr_id=info%3Asid%2Fen.wikipedia.org%3ANewline" class="Z3988"></span></span> </li> <li id="cite_note-20"><span class="mw-cite-backlink"><b><a href="#cite_ref-20">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222" /><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://www.php.net/manual/en/reserved.constants.php">"PHP: Predefined Constants - Manual"</a>. <i>PHP Manual</i>. The PHP Group.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=unknown&rft.jtitle=PHP+Manual&rft.atitle=PHP%3A+Predefined+Constants+-+Manual&rft_id=https%3A%2F%2Fwww.php.net%2Fmanual%2Fen%2Freserved.constants.php&rfr_id=info%3Asid%2Fen.wikipedia.org%3ANewline" class="Z3988"></span></span> </li> <li id="cite_note-21"><span class="mw-cite-backlink"><b><a href="#cite_ref-21">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222" /><cite id="CITEREFBernstein" class="citation web cs1"><a href="/wiki/Daniel_J._Bernstein" title="Daniel J. Bernstein">Bernstein, D. J.</a> <a rel="nofollow" class="external text" href="https://cr.yp.to/docs/smtplf.html">"Bare LFs in SMTP"</a>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=unknown&rft.btitle=Bare+LFs+in+SMTP&rft.aulast=Bernstein&rft.aufirst=D.+J.&rft_id=https%3A%2F%2Fcr.yp.to%2Fdocs%2Fsmtplf.html&rfr_id=info%3Asid%2Fen.wikipedia.org%3ANewline" class="Z3988"></span></span> </li> <li id="cite_note-22"><span class="mw-cite-backlink"><b><a href="#cite_ref-22">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222" /><cite id="CITEREFResnick2001" class="citation cs1">Resnick, Pete (April 2001). <a rel="nofollow" class="external text" href="https://tools.ietf.org/html/rfc2822"><i>Internet Message Format</i></a>. <a href="/wiki/Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<span class="id-lock-free" title="Freely accessible"><a rel="nofollow" class="external text" href="https://doi.org/10.17487%2FRFC2822">10.17487/RFC2822</a></span>. <a href="/wiki/Request_for_Comments" title="Request for Comments">RFC</a> <a rel="nofollow" class="external text" href="https://datatracker.ietf.org/doc/html/rfc2822">2822</a>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=book&rft.btitle=Internet+Message+Format&rft.date=2001-04&rft_id=info%3Adoi%2F10.17487%2FRFC2822&rft.aulast=Resnick&rft.aufirst=Pete&rft_id=https%3A%2F%2Ftools.ietf.org%2Fhtml%2Frfc2822&rfr_id=info%3Asid%2Fen.wikipedia.org%3ANewline" class="Z3988"></span></span> </li> <li id="cite_note-23"><span class="mw-cite-backlink"><b><a href="#cite_ref-23">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222" /><cite id="CITEREFLongin2023" class="citation web cs1">Longin, Timo (18 December 2023). <a rel="nofollow" class="external text" href="https://sec-consult.com/blog/detail/smtp-smuggling-spoofing-e-mails-worldwide/">"SMTP Smuggling - Spoofing E-Mails Worldwide"</a>. <i>SEC Consult</i>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=unknown&rft.jtitle=SEC+Consult&rft.atitle=SMTP+Smuggling+-+Spoofing+E-Mails+Worldwide&rft.date=2023-12-18&rft.aulast=Longin&rft.aufirst=Timo&rft_id=https%3A%2F%2Fsec-consult.com%2Fblog%2Fdetail%2Fsmtp-smuggling-spoofing-e-mails-worldwide%2F&rfr_id=info%3Asid%2Fen.wikipedia.org%3ANewline" class="Z3988"></span></span> </li> <li id="cite_note-24"><span class="mw-cite-backlink"><b><a href="#cite_ref-24">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222" /><cite id="CITEREFZeil2015" class="citation web cs1">Zeil, Steven (19 January 2015). <a rel="nofollow" class="external text" href="https://web.archive.org/web/20160514130116/https://www.cs.odu.edu/~zeil/cs252/s15/Public/ftp/">"File Transfer"</a>. Old Dominion University. Archived from <a rel="nofollow" class="external text" href="https://www.cs.odu.edu/~zeil/cs252/s15/Public/ftp/">the original</a> on 14 May 2016. <q>When in doubt, transfer in binary mode.</q></cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=unknown&rft.btitle=File+Transfer&rft.pub=Old+Dominion+University&rft.date=2015-01-19&rft.aulast=Zeil&rft.aufirst=Steven&rft_id=https%3A%2F%2Fwww.cs.odu.edu%2F~zeil%2Fcs252%2Fs15%2FPublic%2Fftp%2F&rfr_id=info%3Asid%2Fen.wikipedia.org%3ANewline" class="Z3988"></span></span> </li> <li id="cite_note-25"><span class="mw-cite-backlink"><b><a href="#cite_ref-25">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222" /><cite id="CITEREFSapp" class="citation web cs1">Sapp, Craig Stuart. <a rel="nofollow" class="external text" href="https://web.archive.org/web/20090209015201/http://ccrma-www.stanford.edu/~craig/utility/flip/">"ASCII text converstion between UNIX, Macintosh, MS-DOS"</a>. Center for Computer Research in Music and Acoustics. Archived from <a rel="nofollow" class="external text" href="http://ccrma-www.stanford.edu/~craig/utility/flip/">the original</a> on 9 February 2009.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=unknown&rft.btitle=ASCII+text+converstion+between+UNIX%2C+Macintosh%2C+MS-DOS&rft.pub=Center+for+Computer+Research+in+Music+and+Acoustics&rft.aulast=Sapp&rft.aufirst=Craig+Stuart&rft_id=http%3A%2F%2Fccrma-www.stanford.edu%2F~craig%2Futility%2Fflip%2F&rfr_id=info%3Asid%2Fen.wikipedia.org%3ANewline" class="Z3988"></span></span> </li> <li id="cite_note-26"><span class="mw-cite-backlink"><b><a href="#cite_ref-26">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222" /><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://www.unicode.org/charts/PDF/U0080.pdf">"C1 Controls and Latin-1 Supplement"</a> <span class="cs1-format">(PDF)</span>. <i>unicode.org</i><span class="reference-accessdate">. Retrieved <span class="nowrap">13 February</span> 2016</span>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=unknown&rft.jtitle=unicode.org&rft.atitle=C1+Controls+and+Latin-1+Supplement&rft_id=https%3A%2F%2Fwww.unicode.org%2Fcharts%2FPDF%2FU0080.pdf&rfr_id=info%3Asid%2Fen.wikipedia.org%3ANewline" class="Z3988"></span></span> </li> </ol></div> <div class="mw-heading mw-heading2"><h2 id="External_links">External links</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Newline&action=edit&section=12" title="Edit section: External links"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <ul><li>The Unicode reference; see paragraph 5.8 in <a rel="nofollow" class="external text" href="https://www.unicode.org/versions/Unicode4.0.0/ch05.pdf">Chapter 5</a> of the Unicode 4.0 standard (PDF)</li> <li><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222" /><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://www.w3.org/TR/newline">"The [NEL] Newline Character"</a>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=unknown&rft.btitle=The+%5BNEL%5D+Newline+Character&rft_id=https%3A%2F%2Fwww.w3.org%2FTR%2Fnewline&rfr_id=info%3Asid%2Fen.wikipedia.org%3ANewline" class="Z3988"></span></li> <li><a rel="nofollow" class="external text" href="http://www.oualline.com/practical.programmer/eol.html">The End of Line Puzzle</a></li> <li><a rel="nofollow" class="external text" href="https://web.archive.org/web/20060820133536/http://onlamp.com/pub/a/onlamp/2006/08/17/understanding-newlines.html">Understanding Newlines</a> at the <a href="/wiki/Wayback_Machine" title="Wayback Machine">Wayback Machine</a> (archived 20 August 2006)</li> <li><a rel="nofollow" class="external text" href="https://www.rfc-editor.org/old/EOLstory.txt">"The End-of-Line Story"</a></li></ul> <!-- NewPP limit report Parsed by mw‐web.codfw.main‐5c6f46dcf‐9tw6t Cached time: 20250331030012 Cache expiry: 2592000 Reduced expiry: false Complications: [vary‐revision‐sha1, show‐toc] CPU time usage: 0.560 seconds Real time usage: 0.706 seconds Preprocessor visited node count: 12385/1000000 Post‐expand include size: 100409/2097152 bytes Template argument size: 12337/2097152 bytes Highest expansion depth: 23/100 Expensive parser function count: 26/500 Unstrip recursion depth: 1/20 Unstrip post‐expand size: 128409/5000000 bytes Lua time usage: 0.251/10.000 seconds Lua memory usage: 7944649/52428800 bytes Number of Wikibase entities loaded: 0/400 --> <!-- Transclusion expansion time report (%,ms,calls,template) 100.00% 603.166 1 -total 36.12% 217.856 1 Template:Reflist 23.66% 142.726 20 Template:Cite_web 17.48% 105.419 165 Template:Mono 11.37% 68.557 1 Template:Short_description 9.18% 55.357 4 Template:Unichar 8.62% 51.965 1 Template:More_citations_needed 8.42% 50.796 4 Template:Unichar/main 8.41% 50.755 10 Template:Ctrl 8.28% 49.922 1 Template:Ambox --> <!-- Saved in parser cache with key enwiki:pcache:238775:|#|:idhash:canonical and timestamp 20250331030012 and revision id 1283173537. Rendering was triggered because: page-view --> </div><!--esi <esi:include src="/esitest-fa8a495983347898/content" /> --><noscript><img src="https://login.wikimedia.org/wiki/Special:CentralAutoLogin/start?useformat=desktop&type=1x1&usesul3=0" alt="" width="1" height="1" style="border: none; position: absolute;"></noscript> <div class="printfooter" data-nosnippet="">Retrieved from "<a dir="ltr" href="https://en.wikipedia.org/w/index.php?title=Newline&oldid=1283173537">https://en.wikipedia.org/w/index.php?title=Newline&oldid=1283173537</a>"</div></div> <div id="catlinks" class="catlinks" data-mw="interface"><div id="mw-normal-catlinks" class="mw-normal-catlinks"><a href="/wiki/Help:Category" title="Help:Category">Categories</a>: <ul><li><a href="/wiki/Category:Control_characters" title="Category:Control characters">Control characters</a></li><li><a href="/wiki/Category:Whitespace" title="Category:Whitespace">Whitespace</a></li><li><a href="/wiki/Category:Programming_language_comparisons" title="Category:Programming language comparisons">Programming language comparisons</a></li></ul></div><div id="mw-hidden-catlinks" class="mw-hidden-catlinks mw-hidden-cats-hidden">Hidden categories: <ul><li><a href="/wiki/Category:Articles_with_short_description" title="Category:Articles with short description">Articles with short description</a></li><li><a href="/wiki/Category:Short_description_is_different_from_Wikidata" title="Category:Short description is different from Wikidata">Short description is different from Wikidata</a></li><li><a href="/wiki/Category:Use_dmy_dates_from_November_2020" title="Category:Use dmy dates from November 2020">Use dmy dates from November 2020</a></li><li><a href="/wiki/Category:Articles_needing_additional_references_from_February_2016" title="Category:Articles needing additional references from February 2016">Articles needing additional references from February 2016</a></li><li><a href="/wiki/Category:All_articles_needing_additional_references" title="Category:All articles needing additional references">All articles needing additional references</a></li><li><a href="/wiki/Category:Webarchive_template_wayback_links" title="Category:Webarchive template wayback links">Webarchive template wayback links</a></li><li><a href="/wiki/Category:Articles_with_example_C_Sharp_code" title="Category:Articles with example C Sharp code">Articles with example C Sharp code</a></li><li><a href="/wiki/Category:Articles_with_example_Java_code" title="Category:Articles with example Java code">Articles with example Java code</a></li></ul></div></div> </div> </main> </div> <div class="mw-footer-container"> <footer id="footer" class="mw-footer" > <ul id="footer-info"> <li id="footer-info-lastmod"> This page was last edited on 30 March 2025, at 21:25<span class="anonymous-show"> (UTC)</span>.</li> <li id="footer-info-copyright">Text is available under the <a href="/wiki/Wikipedia:Text_of_the_Creative_Commons_Attribution-ShareAlike_4.0_International_License" title="Wikipedia:Text of the Creative Commons Attribution-ShareAlike 4.0 International License">Creative Commons Attribution-ShareAlike 4.0 License</a>; additional terms may apply. By using this site, you agree to the <a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Terms_of_Use" class="extiw" title="foundation:Special:MyLanguage/Policy:Terms of Use">Terms of Use</a> and <a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Privacy_policy" class="extiw" title="foundation:Special:MyLanguage/Policy:Privacy policy">Privacy Policy</a>. Wikipedia® is a registered trademark of the <a rel="nofollow" class="external text" href="https://wikimediafoundation.org/">Wikimedia Foundation, Inc.</a>, a non-profit organization.</li> </ul> <ul id="footer-places"> <li id="footer-places-privacy"><a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Privacy_policy">Privacy policy</a></li> <li id="footer-places-about"><a href="/wiki/Wikipedia:About">About Wikipedia</a></li> <li id="footer-places-disclaimers"><a href="/wiki/Wikipedia:General_disclaimer">Disclaimers</a></li> <li id="footer-places-contact"><a href="//en.wikipedia.org/wiki/Wikipedia:Contact_us">Contact Wikipedia</a></li> <li id="footer-places-wm-codeofconduct"><a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Universal_Code_of_Conduct">Code of Conduct</a></li> <li id="footer-places-developers"><a href="https://developer.wikimedia.org">Developers</a></li> <li id="footer-places-statslink"><a href="https://stats.wikimedia.org/#/en.wikipedia.org">Statistics</a></li> <li id="footer-places-cookiestatement"><a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Cookie_statement">Cookie statement</a></li> <li id="footer-places-mobileview"><a href="//en.m.wikipedia.org/w/index.php?title=Newline&mobileaction=toggle_view_mobile" class="noprint stopMobileRedirectToggle">Mobile view</a></li> </ul> <ul id="footer-icons" class="noprint"> <li id="footer-copyrightico"><a href="https://www.wikimedia.org/" class="cdx-button cdx-button--fake-button cdx-button--size-large cdx-button--fake-button--enabled"><picture><source media="(min-width: 500px)" srcset="/static/images/footer/wikimedia-button.svg" width="84" height="29"><img src="/static/images/footer/wikimedia.svg" width="25" height="25" alt="Wikimedia Foundation" lang="en" loading="lazy"></picture></a></li> <li id="footer-poweredbyico"><a href="https://www.mediawiki.org/" class="cdx-button cdx-button--fake-button cdx-button--size-large cdx-button--fake-button--enabled"><picture><source media="(min-width: 500px)" srcset="/w/resources/assets/poweredby_mediawiki.svg" width="88" height="31"><img src="/w/resources/assets/mediawiki_compact.svg" alt="Powered by MediaWiki" lang="en" width="25" height="25" loading="lazy"></picture></a></li> </ul> </footer> </div> </div> </div> <div class="vector-header-container vector-sticky-header-container"> <div id="vector-sticky-header" class="vector-sticky-header"> <div class="vector-sticky-header-start"> <div class="vector-sticky-header-icon-start vector-button-flush-left vector-button-flush-right" aria-hidden="true"> <button class="cdx-button cdx-button--weight-quiet cdx-button--icon-only vector-sticky-header-search-toggle" tabindex="-1" data-event-name="ui.vector-sticky-search-form.icon"><span class="vector-icon mw-ui-icon-search mw-ui-icon-wikimedia-search"></span> <span>Search</span> </button> </div> <div role="search" class="vector-search-box-vue vector-search-box-show-thumbnail vector-search-box"> <div class="vector-typeahead-search-container"> <div class="cdx-typeahead-search cdx-typeahead-search--show-thumbnail"> <form action="/w/index.php" id="vector-sticky-search-form" class="cdx-search-input cdx-search-input--has-end-button"> <div class="cdx-search-input__input-wrapper" data-search-loc="header-moved"> <div class="cdx-text-input cdx-text-input--has-start-icon"> <input class="cdx-text-input__input" type="search" name="search" placeholder="Search Wikipedia"> <span class="cdx-text-input__icon cdx-text-input__start-icon"></span> </div> <input type="hidden" name="title" value="Special:Search"> </div> <button class="cdx-button cdx-search-input__end-button">Search</button> </form> </div> </div> </div> <div class="vector-sticky-header-context-bar"> <nav aria-label="Contents" class="vector-toc-landmark"> <div id="vector-sticky-header-toc" class="vector-dropdown mw-portlet mw-portlet-sticky-header-toc vector-sticky-header-toc vector-button-flush-left" > <input type="checkbox" id="vector-sticky-header-toc-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-sticky-header-toc" class="vector-dropdown-checkbox " aria-label="Toggle the table of contents" > <label id="vector-sticky-header-toc-label" for="vector-sticky-header-toc-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only " aria-hidden="true" ><span class="vector-icon mw-ui-icon-listBullet mw-ui-icon-wikimedia-listBullet"></span> <span class="vector-dropdown-label-text">Toggle the table of contents</span> </label> <div class="vector-dropdown-content"> <div id="vector-sticky-header-toc-unpinned-container" class="vector-unpinned-container"> </div> </div> </div> </nav> <div class="vector-sticky-header-context-bar-primary" aria-hidden="true" ><span class="mw-page-title-main">Newline</span></div> </div> </div> <div class="vector-sticky-header-end" aria-hidden="true"> <div class="vector-sticky-header-icons"> <a href="#" class="cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only" id="ca-talk-sticky-header" tabindex="-1" data-event-name="talk-sticky-header"><span class="vector-icon mw-ui-icon-speechBubbles mw-ui-icon-wikimedia-speechBubbles"></span> <span></span> </a> <a href="#" class="cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only" id="ca-subject-sticky-header" tabindex="-1" data-event-name="subject-sticky-header"><span class="vector-icon mw-ui-icon-article mw-ui-icon-wikimedia-article"></span> <span></span> </a> <a href="#" class="cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only" id="ca-history-sticky-header" tabindex="-1" data-event-name="history-sticky-header"><span class="vector-icon mw-ui-icon-wikimedia-history mw-ui-icon-wikimedia-wikimedia-history"></span> <span></span> </a> <a href="#" class="cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only mw-watchlink" id="ca-watchstar-sticky-header" tabindex="-1" data-event-name="watch-sticky-header"><span class="vector-icon mw-ui-icon-wikimedia-star mw-ui-icon-wikimedia-wikimedia-star"></span> <span></span> </a> <a href="#" class="cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only" id="ca-edit-sticky-header" tabindex="-1" data-event-name="wikitext-edit-sticky-header"><span class="vector-icon mw-ui-icon-wikimedia-wikiText mw-ui-icon-wikimedia-wikimedia-wikiText"></span> <span></span> </a> <a href="#" class="cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only" id="ca-ve-edit-sticky-header" tabindex="-1" data-event-name="ve-edit-sticky-header"><span class="vector-icon mw-ui-icon-wikimedia-edit mw-ui-icon-wikimedia-wikimedia-edit"></span> <span></span> </a> <a href="#" class="cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only" id="ca-viewsource-sticky-header" tabindex="-1" data-event-name="ve-edit-protected-sticky-header"><span class="vector-icon mw-ui-icon-wikimedia-editLock mw-ui-icon-wikimedia-wikimedia-editLock"></span> <span></span> </a> </div> <div class="vector-sticky-header-buttons"> <button class="cdx-button cdx-button--weight-quiet mw-interlanguage-selector" id="p-lang-btn-sticky-header" tabindex="-1" data-event-name="ui.dropdown-p-lang-btn-sticky-header"><span class="vector-icon mw-ui-icon-wikimedia-language mw-ui-icon-wikimedia-wikimedia-language"></span> <span>22 languages</span> </button> <a href="#" class="cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--action-progressive" id="ca-addsection-sticky-header" tabindex="-1" data-event-name="addsection-sticky-header"><span class="vector-icon mw-ui-icon-speechBubbleAdd-progressive mw-ui-icon-wikimedia-speechBubbleAdd-progressive"></span> <span>Add topic</span> </a> </div> <div class="vector-sticky-header-icon-end"> <div class="vector-user-links"> </div> </div> </div> </div> </div> <div class="mw-portlet mw-portlet-dock-bottom emptyPortlet" id="p-dock-bottom"> <ul> </ul> </div> <script>(RLQ=window.RLQ||[]).push(function(){mw.config.set({"wgHostname":"mw-web.codfw.main-5c6f46dcf-qxgr9","wgBackendResponseTime":139,"wgPageParseReport":{"limitreport":{"cputime":"0.560","walltime":"0.706","ppvisitednodes":{"value":12385,"limit":1000000},"postexpandincludesize":{"value":100409,"limit":2097152},"templateargumentsize":{"value":12337,"limit":2097152},"expansiondepth":{"value":23,"limit":100},"expensivefunctioncount":{"value":26,"limit":500},"unstrip-depth":{"value":1,"limit":20},"unstrip-size":{"value":128409,"limit":5000000},"entityaccesscount":{"value":0,"limit":400},"timingprofile":["100.00% 603.166 1 -total"," 36.12% 217.856 1 Template:Reflist"," 23.66% 142.726 20 Template:Cite_web"," 17.48% 105.419 165 Template:Mono"," 11.37% 68.557 1 Template:Short_description"," 9.18% 55.357 4 Template:Unichar"," 8.62% 51.965 1 Template:More_citations_needed"," 8.42% 50.796 4 Template:Unichar/main"," 8.41% 50.755 10 Template:Ctrl"," 8.28% 49.922 1 Template:Ambox"]},"scribunto":{"limitreport-timeusage":{"value":"0.251","limit":"10.000"},"limitreport-memusage":{"value":7944649,"limit":52428800}},"cachereport":{"origin":"mw-web.codfw.main-5c6f46dcf-9tw6t","timestamp":"20250331030012","ttl":2592000,"transientcontent":false}}});});</script> <script type="application/ld+json">{"@context":"https:\/\/schema.org","@type":"Article","name":"Newline","url":"https:\/\/en.wikipedia.org\/wiki\/Newline","sameAs":"http:\/\/www.wikidata.org\/entity\/Q184914","mainEntity":"http:\/\/www.wikidata.org\/entity\/Q184914","author":{"@type":"Organization","name":"Contributors to Wikimedia projects"},"publisher":{"@type":"Organization","name":"Wikimedia Foundation, Inc.","logo":{"@type":"ImageObject","url":"https:\/\/www.wikimedia.org\/static\/images\/wmf-hor-googpub.png"}},"datePublished":"2003-06-02T04:26:08Z","dateModified":"2025-03-30T21:25:51Z","image":"https:\/\/upload.wikimedia.org\/wikipedia\/commons\/b\/b3\/Illustration_of_a_newline.png","headline":"special character in computing signifying the end of a line of text"}</script> </body> </html>