Good citizens of the Talking Revolution Forum:
Using Mac OS X (10.5.8 PPC), I am trying to write a file with Windows (CRLF) line endings so I can pass it to another program that expects Windows (DOS) line endings. The dictionary says that Revolution automatically translates line endings and writes a file with the line ending that are appropriate for the computer platform; consequently, I find my file always has Mac endings (CR). I see that it is possible to write with a binary option that will avoid the translation but how do I get the LFs into the lines before a binary write operation?
As a work around, I created an AppleScript that tells TextWrangler to load the Mac file (CR) from disk, change the line endings to DOS (CRLF) and then save it. That works but it is a bit of kludge.
I am curious if there is a more direct method to creating a CRLF file.
Thanks in advance,
Bob
From Mac OS X - Write file with CRLF
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- VIP Livecode Opensource Backer
- Posts: 10057
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: From Mac OS X - Write file with CRLF
replace cr with crlf in tData
put tData into url ("binfile:"& tFile)
put tData into url ("binfile:"& tFile)
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: From Mac OS X - Write file with CRLF
Richard:
That worked. As usual with Rev, many things are easier than they seem at first.
Thank you,
Bob
That worked. As usual with Rev, many things are easier than they seem at first.
Thank you,
Bob