how do a create a file with real linefeeds and real returns?

Jan Schenkel janschenkel at yahoo.com
Tue May 20 03:09:01 EDT 2003


--- kee nethery <kee at kagi.com> wrote:
> I cannot figure out how to make Revolution do what I
> tell it to do.
> 
> I am running revolution on Windows and MacOS X and I
> want to create a 
> file that is not for either platform, it must be
> constructed according 
> to the specifications of a web site so that it can
> be uploaded.
> 
> Each line in this upload file MUST end with a return
> linefeed. This is 
> an ASCII(13) followed by an ASCII(10).
> 
> When I try to do this on MacOS X, Revolution decides
> that numtochar(10) 
> should really be a numtochar(13) (or visa versa) and
> instead of a file 
> that is exactly as it should be for uploading to a
> web site, I get a 
> file that has a blank line between each line and
> does not follow the 
> specification.
> 
> How do I get Revolution to stop second guessing my
> intent on line 
> endings in a text file and to just do what I am
> asking it to do?
> 
> Kee Nethery
> 

Hi Kee,

Dar already offered you a solution via the 'open' and
'write' commands. However, you can also use the URL
way, if you apply the "binfile:" option.

  replace return with \
          numtoChar(13) & numToChar(10) \
          in tText
  put tText into URL ("binfile:" & tFilePath)

Hope this helped,

Jan Schenkel.

=====
"As we grow older, we grow both wiser and more foolish at the same time."  (La Rochefoucauld)

__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com



More information about the use-livecode mailing list