HELP! - Linefeeds and Mac Vs Windows

Bjoernke von Gierke bvg at mac.com
Sun Mar 11 18:07:08 EDT 2012


you probably need to use "binfile:" instead of "file:" when you're saving.  Because when you use "file:", all line endings will be converted to whatever the current platform default line endings are. If you do use binfile, beware that you also need to do mactoiso or isotomac depending on what you do with the text and where it's saved.

On 11.03.2012, at 22:48, RevList wrote:

> I have a stack that builds a perl script.
> It works just fine when I create the script on Windows.  When I open the saved script that is created on the windows version of my app in NotePad, it looks just fine and works great with my PERL cgi.
> If I use the same stack on Mac and generate the same perl script on the mac and then copy it over to my Windows box and open it in NotePad, it appears that all of the Returns are missing and the Perl
> CGI fails.
> 
> I am assuming then, that PERL needs the line feeds that are created when I save the file out on Windows.
> 
> Building the file is simple.  I just concatenate a bunch of string together and use the RETURN key word to separate lines.
> 
> I tried using CRLF instead of RETURN and got the same results when viewed in notepad.  No wrapping of the lines.
> 
> I have compared the two versions of the files in editors that allow me to show the invisible characters and they look identical.
> Comparing the two in BBEdit indicates the files are identical, yet when I open them in NotePad, they clearly are not.
> 
> Can anyone tell me what is going on here and how I can get the Mac version to look like the Win version?
> You can download the files for comparison yourself at http://www.createchsol.com/perlscripts.zip
> 
> I would greatly appreciate any help one can give me.
> 
> 
> 
> ******************************************
> Stewart Lynch
> CreaTECH Solutions
> slynch at CreaTECHSol.com
> 604.484.8499
> Skype:StewartLynch
> 
> There are only 10 kinds of people.  Those who understand binary and those who don't.
> ******************************************
> 
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode





More information about the use-livecode mailing list