can anyone tell me what the difference between carriage return (U+000D
), line feed (U+000A
), and next line (U+0085
) are
@wallhackio I've never heard of next line U+0085
, but judging by the hex code, that's not in ASCII?
@vaporeon_ apparently its from a particular encoding IBM used in the 60s that Unicode subsumed a few characters from
@wallhackio Here's a short video that I found of some typing and then a carriage return, if that helps visualize it: https://youtube.com/watch?v=UxKqOdQx-9k
@vaporeon_ wow typewriters are neat
@vaporeon_ do you own any?
@wallhackio @vaporeon_ they write all their statuses on a typewriter and mail them to me internationally so i can insert them into the database directly
@monorail @wallhackio @vaporeon_ don't lie, there's no way they get through the mail that fast.
Clearly you just reach across the Atlantic Ocean to get them.
@The_T @wallhackio @vaporeon_ how big do you think i am...
@monorail @wallhackio @vaporeon_ I have no sense of scale.
@The_T @monorail @vaporeon_ i was going to make this EXACT JOKE so, um, fuck you.
@wallhackio @monorail @vaporeon_ fuck you!!! 💜
@wallhackio No, unfortunately
But I got to use a ASR-33 teletypewriter in the computer museum when I was there, some of the happiest days of my life
I hope I can go visit again when I don't have to be busy with other things
@wallhackio sure, the difference is that none of them are line separator (U+2028)
@Lady you revealed the existence of this additional, seemingly redundant code point to me and therefore i will blame you for its existence.
@wallhackio they all come from a confusion between control characters, which control the display of terminals, and “meaningful” characters, which are intended for transmission and display
ASCII confused these quite heavily and said things like “computers can support O<backspace>" to get Ö”; it was really a standard of codepoints for text display on terminals and only ancillarily a standard of text encoding for storage; this of course meant that when computers needed to decide how to represent linebreaks in plain text, they differed on how to do it
some picked CR, some picked LF, and some picked CR+LF
well then ASCII was extended into 8-bit space and folks decided that having these control characters with confusing and overloaded meanings was a problem, so they introduced a new character, NEL, which almost nobody actually adopted. some weirdos decided to do CR+NEL just to be spicy
then Unicode came along. Unicode decided that mandating the meaning of control characters was a pointless pursuit so they refused to specify behaviours for them. but of course it would be silly to not have a linebreak character in Unicode, so they added LSEP. they also added Paragraph Separator at U+2029 as a substitute for form feed i guess?
@wallhackio Well, carriage return moves the carriage of your typewriter or dot-matrix printer back to the beginning of the line, while line feed moves on the paper so that you get a new line
If you just do a carriage return without line-feed, you'll end up printing over text that's already there; if you do line-feed without carriage return, while you get an empty line, the carriage will be at the end of new line and not at the beginning...