Dumb return question

Richard Gaskin ambassador at fourthworld.com
Mon Aug 11 10:26:47 EDT 2014


jbv wrote:

 > On Mac and LC 6.5.2, when writing successive lines of text to a file,
 > how can I get the return character to be the standard Unix return ?
 > No matter what I try (return, linefeed, the numtochar of 13, the
 > numtochar of 10) it always ends up with Classic Mac CR.
 > So, when uploading the files to a Linux server, my LC scripts detect
 > only 1 line in the .txt files...

The default read/write mode is text, in which NULLs are translated to 
spaces and line-endings are coerced to the convention used by the host 
OS (thought with OS X being Unix there's a good argument to stop using 
ASCII 13 and get on board with OS X's modern ASCII 10).

Specifying write as binary will allow you to have the resulting file 
reflect only what you put into it, without modification.

-- 
  Richard Gaskin
  Fourth World Systems
  Software Design and Development for the Desktop, Mobile, and the Web
  ____________________________________________________________________
  Ambassador at FourthWorld.com                http://www.FourthWorld.com




More information about the use-livecode mailing list