Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

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.)

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.