The problem can be hard to spot if some programs handle the foreign newlines properly while others do not.
The File Transfer Protocol can automatically convert newlines in files being transferred between systems with different newline representations when the transfer is done in "ASCII mode".