tsNet mail message not formatting

Richard Gaskin ambassador at fourthworld.com
Wed Mar 3 16:58:53 EST 2021


Bob Sneidar wrote:

 > 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??

It may be that Konica believes all computers run Windows. Silly as it 
sounds, I've seen that from some manufacturers.

When writing a file from LC in text mode, line endings are altered.

Originally, the way in which they were altered was to create a text file 
that played nice with other programs on the host OS.

Internally, LC uses the Unix convention for line endings, LF (made 
confusing by allowing CR to also be used for the same internal line ending).

When writing to a file in text mode, what line endings are converted to 
varies by what's most common on that platform:

Linux: LF is preserved as-is

Windows: LF becomes CRLF

macOS: LF becomes CR

The problem is that macOS (v10 and later) is a Unix, unlike MacOS (v9 
and earlier) which was its own trippy little island unto itself.

Unix (including macOS) most commonly uses LF for line endings, but when 
LC writes out in text mode on macOS it still uses the older MacOS line 
ending, CR.

None of this is made any clearer by Apple's decision to use MacOS to 
denote OS 9 and earler, and macOS for 10 and later. :)

-- 
  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