Xojo_project line ending

How can I force a certain line ending when saving as a version control xojo_project? We have 3 licences, all Mac, but for some reason, one of them insists on saving the file as MacOS line ending, whereas the other two save as Unix. This makes comparing using FIleMerge difficult as the whole file is marked as changed.
I’ve changed the file manually in BBEdit, but after a build and save, it always reverts to MacOS. i.e. Even though it was unix line ending in the file when it was opened, after a build and save, it changes.



Something else is going on. We edit project across Mac, Windows, and Linux and the line endings are always consistent.

1 Like

are you sending files by FTP?
some ftp clients change line endings during the transmission.
set the file format to be binary

Oh yea, FTP. I suggest setting default to Binary instead of letting the application determine the method.

The one that changes it is the local computer, no FTP.

I’ve just changed it to Unix using BBEdit, opened it, changed the build number and saved and it kept the unix line ending. I’ve run a xojo_script to build it and it’s still unix.

I swear I’ve gone through this before, but maybe opening as unix, changing a build number, then saving immediately has now finally reset it to unix.

I’ll keep and eye on it.



It’s also possible that this is some kind of Xojo bug.
We still have issues with line endings although we’re only developing on windows.
Whole classes are marked as changed only because Xojo changed the line ending.

For what it’s worth, my tools (SourceTree and Kaleidoscope) offer options to ignore whitespace. Maybe that’s why I’ve never seen this issue.


So the IDE should be honoring the line endings for each file. That said, if a file gets out of sync where the line endings are mixed, I seem to recall that it uses the line endings from the manifest file.

Git can be setup do use a single one type.

I have AutoCRLF set.
Probably that’s the reason for these changes in Git.
Xojo is saving sometimes with another lineending and Git changes it to CRLF.