Enter & Preserve UNIX linefeeds on Mac OSX
Rob Cozens
rcozens at pon.net
Fri Dec 6 12:54:01 EST 2002
>How To Enter and Preserve char(10) line breaks on a file saved on Max OSX?
Aloha Sannyasin,
switch conversionType
case cancelIt
exit menuPick
break
case "MacOS"
replace return with numToChar(13) in sourceText
break
case "Win32"
replace return with numToChar(13)&numToChar(10) in sourceText
break
-- Unix needs no conversion: internal line ends are char(10) on all
-- platforms
end switch
put sourceText into URL ("binfile:"&convertedFile)
The key is "binfile": the prevents the MC engine from saving the text
with platform-specific line ending.
--
Rob Cozens
CCW, Serendipity Software Company
http://www.oenolog.com/who.htm
"And I, which was two fooles, do so grow three;
Who are a little wise, the best fooles bee."
from "The Triple Foole" by John Donne (1572-1631)
More information about the use-livecode
mailing list