• edinbruh@feddit.it
    link
    fedilink
    arrow-up
    5
    ·
    2 days ago

    Unix needed only \n because it had complex drivers that could replace \n with whatever sequence of special characters the printer needed. Also, while carriage return is useful, they saw little use for line feed

    On dos (which was intended for less powerful hardware than unix) you had to actually use the correct sequence which often but not always was \r\n (because teleprinters used that and because it’s the “most correct” one).

    Now that teleprinters don’t exist, and complex drivers are not an issue for windows, and everyone prefers to have a single \n, windows still uses \r\n, for backward compatibility.