1

I use Linux for hosting and editing code, but there are others at work that are using Windows. Sometimes they make the files have \r\n in them, and it's causing problems with version control.

Should they be using the ASCII mode in their FTP manager? Should that force the line endings to be \n when uploading from Windows to Linux?

1 Answer 1

1

ASCII mode works by converting all line terminators to \r\n in transit, and then having the receiving system convert this sequence to its native line-termination form.

So yes, if the files from the Windows users consistently have \r\n throughout, then uploading them in ASCII mode to a Linux box should result in the received files having \n throughout.

(I'm not entirely sure what would happen if the files have \n in some places and \r\n in others; you might then end up with the received files having extra CRs in some places.)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .