Follow

can anyone tell me what the difference between carriage return (U+000D), line feed (U+000A), and next line (U+0085) are

@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...

@wallhackio I've never heard of next line U+0085, but judging by the hex code, that's not in ASCII? :psyduck:

@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: youtube.com/watch?v=UxKqOdQx-9k

@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.

@wallhackio No, unfortunately :blobcatsadreach:

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 :blobcatmeltcry:
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?

Sign in to participate in the conversation
📟🐱 GlitchCat

A small, community‐oriented Mastodon‐compatible Fediverse (GlitchSoc) instance managed as a joint venture between the cat and KIBI families.