login about faq

How to set ASCII Mode in chilkat SFTP component ?

asked Jun 19 '15 at 00:39

rejigopu's gravatar image


The "SFTP" protocol is Secure File Transfer over SSH. It is a protocol entirely unrelated to the "FTP" protocol. The only thing they have in common is the purpose of uploading and downloading files. It should never be assumed that particular features or concepts that exist in FTP would also exist in SFTP. For example, one can upload or download files using the HTTP protocol, but nobody ever asks for "ASCII" mode in HTTP, and nobody ever asks how to "change the remote directory" in HTTP. This is simply because the name "HTTP" makes it more clear that it is not "FTP". Likewise, "SFTP" is not "FTP". It is no more like FTP than HTTP. Certain application programs, such as FileZilla, may present a unified user interface for both SSH/SFTP and FTP, but under-the-covers, they are implemented entirely differently, each to particular model as defined by the protocol.

That being said.. the SFTP protocol defines a "textMode" disposition that can be specified in the args to the OpenFile method. I don't know if all SFTP servers pay attention to it, but it's something one can try to have the server automatically convert line-endings to the customary LF or CRLF depending on the server operating system..

ASCII mode was present in the FTP protcol because the FTP protocol is a very old protocol. EBCIDIC was common way back when.. and one reason for the mode was to convert EBCIDIC to/from ASCII. Nowadays, EBCIDIC is not common and essentially ACSCII mode is for line-ending conversion (CRLF on Windows, and bare-LF on everything else.)


answered Jun 19 '15 at 09:07

chilkat's gravatar image

chilkat ♦♦

Your answer
toggle preview

Follow this question

By Email:

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



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



Asked: Jun 19 '15 at 00:39

Seen: 737 times

Last updated: Jun 19 '15 at 09:07

powered by OSQA