file: vs bibfile: usage?
bobsneidar at iotecdigital.com
Mon Jan 7 17:28:03 CET 2019
This is a perennial problem. My personal opinion is that unless a user explicitly wants to alter the line endings in a file, no assumptions should be made by the developer in this regard. A classic example (at least for me) is working with files exported from copiers. Let's say I want to export the email addresses from a Toshiba copier, edit them in a spreadsheet, then re-import them back into the copier. Simply OPENING the text file, in TextEdit or Word on a Mac OS will convert the line endings to the Mac defaults, EVEN IF I DO NOT SAVE THE FILE!!! Now the Toshiba copier will reject the file because it is expecting line feeds and it has CRLFs instead. So I have to edit these files in a Windows VM or I break them.
> On Jan 4, 2019, at 10:07 , Brian Milby via use-livecode <use-livecode at lists.runrev.com> wrote:
> On a Mac you have to use binfile if you want the appropriate line endings (LF)* as file will change them to the legacy version (CR). On Windows, you probably still want to use file so that the line endings are adjusted to CRLF. UTF recognizes both as valid (CRLF and LF), not sure about CR.
> * I use Xcode as my justification to say that LF is proper. It is the line ending used there.
More information about the use-livecode