tsNet mail message not formatting

matthias_livecode_150811 at m-r-d.de matthias_livecode_150811 at m-r-d.de
Wed Mar 3 16:51:27 EST 2021

The problem is,  put URL file:  uses the line endings of the os where the it is executed, even if you have a container/variable with some text and line endings CRLF. As soon as you use put .... into URL "file:..." the line endings are converted to the default ones of the os where the code is excecuted. In case of macOS the line endings are converted from CRLF to CR.

If you want to keep the CRLF line endings on macOS then you have to use put .... into URL "binfile:..."  In this case the written data keeps the line endings you used when "filling" the container/variable.

Matthias Rebbe
Life Is Too Short For Boring Code

> Am 03.03.2021 um 22:43 schrieb Bob Sneidar via use-livecode <use-livecode at lists.runrev.com>:
> OK Now I am interested. I have a little utility that converts a Konica Minolta address book to a Toshiba one. If I run the utility on a Mac, the address book will not import into a Toshiba copier, but if I first OPEN the csv file in WINDOWS, then save and close it, suddenly it WILL import. I tracked this down some time ago to the fact that the line endings were different than the Toshiba was expecting. I thought I fixed it by using LF but I have the same problem as before. From what I am reading, the LC constants will return a different result on LC for Windows as opposed to LC for Mac??
> Bob S
> On Mar 3, 2021, at 11:51 AM, Brian Milby via use-livecode <use-livecode at lists.runrev.com<mailto:use-livecode at lists.runrev.com>> wrote:
> If you want to be the most accurate (clear for others reading code) you would use the LF constant instead of CR since that is how it actually evaluates.  The only way to generate an actual CR within code is to use CRLF (which gets both) or use numtobyte(13).
> If you export as text, then you get what is expected on Win/Linux and get CR on Mac (which is wrong in my opinion).
> Sent from my iPhone
> _______________________________________________
> 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