martin wrote:
OK then. The internal editor of WinSCP does not preserve line endings. You can use any external editor you like instead.
Hello, I am using an editor that doesn't convert the line endings, and I'm still having a similar issue. I have a file in UNIX that originated in Windows, so we expect each line to end with CRLF. However, we have found in some cases, the data contains a CR, so the end of the line actually looks like CRCRLF. With my transfer mode set to Binary, when I download the file, it preserves the CRCRLF, and that's what I see in my editor. Then if I change something in the file, and save it, the end of line in UNIX after upload is just CRLF. I verified in the temp\scp### directory, the updated file still has the CRCRLF, so my editor is not changing the end of line. Is it possible that only the download is in binary mode, but the upload is occurring in ASCII mode?
Description: this is a UTF-8 file that ends with CRCRLF. Depending on how you view it, it might appears as two lines.