[OT ish] Visual Code Editor and Line Endings
benr_mc at cogapp.com
Wed Jul 12 05:34:49 EDT 2023
I agree that the behaviour of the editors is very annoying.
But LC is also needs to get with the program. On the positive side, it
interprets any combination of LF, CR, CRLF as a line break when reading a file
But it persists in writing text files with a platform dependent encoding of
line breaks, which on macOS (where the system default is LF) is still CR.
As I wrote in https://quality.livecode.com/show_bug.cgi?id=17774:
> As near as I can tell, Metacard introduced support for Mac around 1993
> (? -happy to be corrected). So MC/Rev/LC has already been writing the 'wrong'
> files for twice as long as it was writing the 'right' ones (based on MacOS X
> introduced in 2001). At what point can we change? If not now, when?
But I was excited just now to see this:
Is it possible that the long reign of CR terror may soon be over?
On 10/07/2023 21:09, Bob Sneidar via use-livecode wrote:
> Code is not the only editor to “assume” you want to change out all the line endings. Microsoft has been doing this for years. Just OPENING a file where the platform defaults differ from the document results in Microsoft Word altering the file, despite a user closing without saving.
> It is in my opinion a serious violation of trust on Microsoft’s part. Who made them the gods of data formatting that they think they can take this license with files that do not belong to them?
> Toshiba has an address book export function with line endings of a certain kind. If I open them in Word for Windows, edit the file and save it, everything works fine. If I just open the file on Word for MacOS it will “corrupt” the file, and I do mean corrupt! The file will become unusable even if it is not edited or saved.
> One of a hundred things that upset me about Microsoft.
> Bob S
>> On Jul 10, 2023, at 9:25 AM, Ralph DiMola via use-livecode <use-livecode at lists.runrev.com> wrote:
>> I moved from Atom to Code 6-9 months ago. Didn't look back until yesterday.
>> Code does not support CR line endings. I received a text file that was
>> output from InDesign(latest version). I made a minor change in the text
>> file. I processed it with a program that had been around for years. I sent
>> the processed file to the customer and results were disastrous. Unknown to
>> me all the LFs in the file were changed without warning to line endings.
>> Apparently VC only has 2 line ending options LF and CRLF but not CR.
>> Apparently I'm not the first to get bitten by this. An enhancement request
>> to support CR line endings has been around for 5 years and not addressed.
>> Seem like a simple fix, but what do I know about VC's internals.
>> Hope this prevents one of you from getting bitten..
>> Ralph DiMola
>> IT Director
>> Evergreen Information Services
>> rdimola at evergreeninfo.net
>> use-livecode mailing list
>> use-livecode at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
More information about the use-livecode