Because Microsoft thought they knew better than everybody else.
Cindy Hamilton
Because Microsoft thought they knew better than everybody else.
Cindy Hamilton
The paper carriage is returned to the *right*, so the typing starts at the *left* of the new line. The first thing the lever does is to rotate the platen by means of a ratchet 1, 2 or 3 lines (manual typewriter).
The point is you don't have to press two separate keys for the CR LF.
I expect that a web page uploaded from a Windows machine to a UNIX server will be stored as CR LF. Then when it's downloaded to Windows extra CRs will be added. I haven't checked. I don't think the browser cares.
Some browsers care. Others don't. I was lazily using Internet Explorer to view web pages that happened to be plain text Unix files (no HTML formatting) until some update made IE fail to wrap the lines at the linefeed. That induced me to switch to Firefox.
Cindy Hamilton
Yes. The CR LF sequence is implicit.
The browser ignores all white space except a single space.
Unless its inisde a <PRE>formatted block
>
I suspect it's about old line printers. You could CR then space forward to underscore something.
Typewriters had separate CR and LF functions. If you pressed the return lever gently, you'd get LF. If you pushed firmly, you got both LF and CR.
Cindy Hamilton
Web pages should be handled as is. What you have to watch are POSIX calls like fopen(). You can add 'b' to the mode string to differentiate between binary and text files. It doesn't have any affect on Unix based systems. On windows, without the 'b' the file is opened in text mode and Windows helpfully adds the CR character to all the LFs. Plays hell with zip files.
The Windows ftp server used to do the same corruption if you didn't specify binary but I think it's gotten smarter.
Microsoft's decision to mimic a 1943 Underwood has been as big a pain as the backslashes.
You are dating yourself admitting you know how one of those worked.
You can't lay that one entirely on Microsoft. First you start with an ASR-33 teletype. Given the timeline, I'm assuming Gary Kildall used a PDP-8 or PDP-11 at UW, but before Unix variants became popular. When he created CP/M he went with what he knew. Most people could figure out what the LPT device was but I doubt many CP/M machines ever had paper tape readers or punches (PTR, PTP).
The exact genealogy of DOS is cloudy but it followed CP/M closely.
You can blame the backslash on IBM. They used / for command line options like Unix uses - (or -- more recently). When directories were added to MSDOS 2.0 they needed something else and \ was sort of similar.
Much of the state of IT in 2020 came from more or less sub-optimal decisions made 50 years ago. Like most things, come to think of it.
It depends on the typewriter. I had one that returned the carriage and would give you one, two (or maybe even three I can't remember) rotations of the platen if you pushed harder (there was a feelable stop in it so you could tell how hard to push). I can't remember if the first rotation occurred before or after moving the carriage, but the second (and possibly third) rotations must have been after the carriage moved, or the option couldn't have been selectable.
What I've had trouble with is pasting from a Word document to a web server. It ends up losing all the line spacing. Paragraphs all merge into one with just a single linefeed.
What annoys me more is Windows dialog boxes (eg. "Are you sure? OK or Cancel") are the wrong way round. MacOS has it correct - OK on the right. Affirmative, more, go, etc should always be on the right, just like a car accelerator. I'm forever hitting yes instead of no then regretting it.
docx is an XML format and whitespace doesn't count. I'm surprised it doesn't look like a pile of garbage. Raw XML isn't particularly human readable.
What do you mean? It must have something marked in it to indicate a new line.
***** Well the carriage returns got passed through, just not the extra linefeeds. *****Is what I saw instead of:
***** Well the carriage returns got passed through,just not the extra linefeeds.
*****I can't remember if I uploaded the docx or copied and pasted it into a form on the webpage.
I don't know what you tried to upload but the docx format is quite complex. You can unzip it:
$unzip Wednesday\ Practice\ News.docx Archive: Wednesday Practice News.docx inflating: [Content_Types].xml inflating: _rels/.rels inflating: word/_rels/document.xml.rels inflating: word/document.xml inflating: word/theme/theme1.xml inflating: word/settings.xml inflating: word/webSettings.xml inflating: word/stylesWithEffects.xml inflating: docProps/core.xml inflating: word/styles.xml inflating: word/fontTable.xml inflating: docProps/app.xml
word/document.xml contains the text that will be displayed, but it is all on one line and starts with a number of namespace declarations like
xmlns:m="
I've formatted those for convenience. In the document they are run on, separated by a space. Eventually you get to a bunch of junk like below which, viewed in LibreOffice is a centered, bold faced and underline header 'Wednesday Practice News'. Like I said the Open Office (not to be confused with the Linux program) XML isn't human readable. Very little XML is although if you pretty print it so you can see the structure it sometimes gets better.
Usually when I am exporting XML I do put in white space and line breaks so I can read it but anything between elements is ignored when you're parsing it.
<w:body><w:p w:rsidR="00574F03" w:rsidRDefault="00E876FA" w:rsidP="00E876FA"><w:pPr><w:jc w:val="center"/><w:rPr><w:b/><w:sz w:val="28"/><w:szCs w:val="28"/><w:u w:val="single"/></w:rPr></w:pPr><w:r><w:rPr><w:b/><w:sz w:val="28"/><w:szCs w:val="28"/><w:u w:val="single"/></w:rPr><w:t>Wednesday Practice News</w:t></w:r></w:p>
Meh. I'm about to turn 63. By Usenet standards, I'm a kid.
Cindy Hamilton
You're right. I just like to slag Microsoft.
Cindy Hamilton
Save the Word doc to a text file. There's an option for inserting newlines in the save dialog.
Cindy Hamilton
No, the Word GUI handles the line wrapping. Every paragraph is stored as a single line.
Cindy Hamilton
Hell yeah! You were running around in diapers when I was in high school. I guess mechanical typewriters were still around. The last typewriter I dealt with was a Selectric I rented when I wanted something classier than dot matrix for some documents. That was around 1985 and when the rental term ran out the office supply place didn't seem to care if i ever brought it back.
Noble task... My preferred target is Apple. We have an app that was developed for Android that had to be ported when a client preferred iPads. Fortunately I'm not doing the work but from the grumbling of everybody involved from programming to QA it isn't going well.
Have something to add? Share your thoughts — no account required.
Ask the community — no account required