Ask Question. Asked 10 years, 5 months ago. Active 8 years ago. Viewed 96k times. Improve this question. Add a comment. Active Oldest Votes. Improve this answer. Alexey Ivanov Alexey Ivanov As an additional info for the OP: Newline. Tomas Tomas 54k 46 46 gold badges silver badges bronze badges. If I'm right, this is due to character conversion happening when opening files as text streams. See FredFoo 's anwer. This is the correct way to look at it because it deals with the root cause: original Term design and HEX values.
Fred Foo Fred Foo k 71 71 gold badges silver badges bronze badges. Peter Ruderman Peter Ruderman The old Typewriter and for that matter the dot matrix printer. We used to have to learn, know, all this stuff.
This reminds me of when I used to have to send printer control codes to printers to get them to behave a standard way. Whenever a customer got a different printer I would have to work out what to send it to behave as the others did. Same with Modems. Everything is automatically abstracted these days. June 07, Regarding autocrlf, I ran into this interesting tidbit recently.
Normally, I set global autocrlf to true on Windows. That's normal for most folks. Recently, I had to set up a machine without autocrlf set to true. So, the interesting behavior is that when global autocrlf is not set, git defaults to false as documented , but Visual Studio defaults to true wha?
I had great fun fixing my branch after using both VS and git for various checkins. Stephen Cleary. I find it fascinating that you have to explain this physical paradigm, it's similar to understanding the en' space and 'em' space and how they define hyphens and various dashes.
Then what descenders, ascenders, kerning and leading and gutters are and the physical paradigm that gives us that language. I am getting old Nice explanation, thanks! Evan Young. June 08, I have never understood why we have CR and LF, but this makes sense.
Therefore being backwards compatible and make. Net code more portable. Peter Campbell. June 10, Most Internet protocols, e. EditorConfig also defines which line endings are used, but from the editor side. It also controls other whitespace like indentation, trailing spaces, and the final line ending. Using both that and. June 11, Mahesh Bakali. June 12, Performing a CR without an LF used to let you overstrike an entire line or an infinite number of lines on the paper and, on Tektronix CRT terminals, even on the screen.
That, in turn, let you create a potentially infinite number of custom characters, on the fly, without having to fool with new glyphs, bitmaps, or fonts. In the classic artform of raster-image "ASCII art," the available contrast range was greatly extended by the ability to print two, three, or four "passes" of each line, overlaying characters that placed ink in more space than a single character alone could ever achieve I have a set of files that uses four-pass overstrike to print a wonderful classic Star Trek poster.
I'm sure there are, or were, other applications for overstriking, back "when overstriking was easy", and for 25 years now I've bemoaned the fact that the very concept seems to have gotten forgotten -- probably because GUI apps were designed to emulate the behavior of CRT terminals such as the DEC VT series that didn't happen to support overstrike.
If only we had skipped directly from paper to GUIs, this might not have happened! Anyway, over those same 25 years I've also been wishing that MS Word's "overstrike" mode really was overstrike mode; what it really is, though -- and what it ought to be called! It would be great for Word to have true overstrike mode so you could cheaply pull the abovementioned "custom bullets" and other tricks, easily, as used to be the case.
I'm not a big fan of taking away capabilities in the course of "improving" a technology. Thank goodness output onto paper, at least, is now performed by mechanisms that don't rely on CR and LF to control the position of the "next character to be printed. If it were up for a vote, my vote would therefore be for CR and LF to remain separate, and for each to perform, or emulate, only-and-exactly the behavior it had in the original days of paper teletype.
Sign up to join this community. The best answers are voted up and rise to the top. Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams? Learn more. How do I type carriage return? Ask Question. Asked 9 years, 7 months ago. Active 2 months ago. Viewed 45k times. How do I type a carriage return control character, in Windows or in Linux? I'd like to type a backspace character too. Improve this question. Dagelf 7 7 silver badges 15 15 bronze badges.
Colonel Panic Colonel Panic
0コメント