login about faq

How is it possible to convert CRLF line endings to LF line-endings when uploading a file from Windows to Linux/Unix?

asked Jan 20 '14 at 11:27

chilkat's gravatar image

chilkat ♦♦
11.8k316358420


One possibility is to add ", textMode" to the createDisposition argument of the sftp.OpenFile method. For example:

bool success = sftp.OpenFile("something.txt","readWrite","openOrCreate, textMode");

This assumes the server pay attention to the "textMode" disposition and implements it. Otherwise, the solution is to convert the CRLF to LF line endings prior to upload.

link

answered Jan 20 '14 at 11:30

chilkat's gravatar image

chilkat ♦♦
11.8k316358420

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×200
×6
×1
×1

Asked: Jan 20 '14 at 11:27

Seen: 1,208 times

Last updated: Jan 20 '14 at 11:30

powered by OSQA