Re: More info on carriage return problem
- Posted by Jeffrey Fielding <JJProg at CYBERBURY.NET> Aug 12, 1998
- 633 views
In some programs, the end of a line is represented by a carriage return ('\r' or 13) followed by a new line character ('\n' or 10). You may want to use '\r\n" instead of "\n\n" because "\n\n" could make a blank line in some programs. Here is the code to answer your question: constant REPLACE = "\n", WITH = "\r\n" integer i sequence s -- the stuff to change i = match(REPLACE,s) while i > 0 do s = s[1..i-1] & WITH & s[i+length(REPLACE)..length(s)] i = match(REPLACE,s) end while If you are interested in sending mail using SMTP, I have code for sending e-mail using sockets (from winsock.ew) and SMTP. (It is still in development, but it works...) Jeffrey Fielding -----Original Message----- From: <EUPHORIA at LISTSERV.MUOHIO.EDU> To: <JJProg> Date: Wednesday, August 12, 1998 1:28 PM Subject: More info on carriage return problem >I'm using the clipboard routines to try and paste something into a mailer. >Now, I don't have a mailer to test it, so I use Notepad to test. My >question is twofold: > >It seems that after each line there's an ASCII 10. Notepad, however, >insists on two carriage returns \n\n. How do I change each ASCII 10 \n\n > >Secondfold, this is slightly off-topic. Like I said, I don't use a popular >mailer, like Eudora or Outlook. When these mailers encounter an ASCII 10, >will it initiate a line break, or will it behave like Notepad? > >--Alan >