Enter search queries below or use the tag links to the right to browse the knowledge base by category (Show All Tags).
How do Robo-FTP and Robo-FTP Server handle the difference in line endings between systems?
The ASCII standard for text does not specify a line ending character (also known as end-of-line or EOL). As a result, makers of systems adopted their own conventions. Windows (DOS), Unix, and Mac use CR-LF, LF, and CR to terminate lines, respectively. There are even some systems that use LF-CR, although those are pretty uncommon these days.
This caused serious problems once people wanted to network systems from different manufacturers together. Therefore, during this time (back in the early 1970s) ARPAnet researchers agreed on a convention:
All text files sent across the network must have lines terminated with CR-LF.
This means Windows-based FTP clients and servers do not have to do any type of conversion when uploading / downloading files. On Windows, files already have the CR-LF line endings required for FTP.
Keep in mind that this only applies to files sent / received using HTTP and FTP in ASCII mode. Files transferred with FTP in binary mode go through no conversion. Therefore, if you download a text file from a Unix server using binary mode, the file will still have Unix line endings.
The SFTP protocol only sends / receives in binary mode -- there is never any line ending conversion.
If you need to perform line ending conversion before or after sending, you can do this using the freely available unix2dos and dos2unix utilities.
Here is an article that describes the history of the line ending convention in more detail: The End-Of-Line Story.
Tags: EOL, line endings

