CompuServe Thread

#Uploads/Downloads

6 messages in this thread
#94120From: Tony DousetteNov 18, 1987 11:53 PM
I've uploaded a text file from another computer to mine. The sender didn't remove the appropriate carriage returns or line feeds, so the file is double-spaced in ed. When I put the text into CityDesk project, the extra line feed (or carriage return?) prints out as a quad character. As you can tell, I know little about this. I'm not sure what the extra character per line is, but I'd like to get rid of it. Can anyone tell me how to do so without having my friend upload the file again? Also, how about some background on the problem? Why do some computers need two characters to get a new line when the Amiga does fine with one?
#94204From: Richard Rae/SYSOPNov 19, 1987 12:58 PM
Tony, That extra character is a carriage return. There are several ways to get rid of it. One method is to run a filter program on the file; there are several here in the DLs. Another is to load it into a text editor and do a search and replace: change all instances of $0D <CR> to nothing. As to why, it has to do with the history of the operating system. Most micro OSes which grew up from other micro OSes use a CRLF pair. DEC VMS systems use CR only, internally. UNIX systems use LF only, internally. AmigaDOS is based on Trip(e)OS, a system which uses LF only, ala UNIX. Really, it's just a matter of implementation; there's not much rational reasoning behind it that I can find. 8) Rick
#94293From: Tony DousetteNov 19, 1987 11:21 PM
Thanks, Rick. I'll give the text editor a try. Also, thnx for the explanation. Tony
#94242From: Douglas MartinNov 19, 1987 7:03 PM
Because traditionally a Carriage Return (CR) puts you back at the left margin and a Line Feed (LF) moves you down a line. The combination puts you back at the left margin AND down a line. The need for that combination is so common, however, that many systems assume that when they get just one of them (CR or LF, as the case may be). I seem to recall that if you do RAW i/o on the Amiga, the two characters have their traditional meanings. The traditional meaning of Carriage-Return as well is useful on some systems when you want to over-print.
#94296From: Tony DousetteNov 19, 1987 11:39 PM
Thanks to you, too, Doug. After reading Rick's message, I loaded the file into Scribble. I used the Default Format command (the menu item) to change from CR+LF to LF only, and then wrote the file back to disk. Looks great now! Tony
#94419From: BILL LEACHNov 20, 1987 6:44 PM
Tony: There is a special reason for using LF for the CR/LF rather than CR for both. If you want a new line you need the line feed but if you want to overprint you don't want to have to do a reverse line feed. That is there may be times when you want a CR without a LF but seldom any occassion where you would want a LF that a CR would hurt you. That applies mainly to printers of course but even helps for some terminal type programs. 73, bill