Skip to main content

FTP, ACSII & Binary

More
15 years 7 months ago #29829 by Alans
Hi.. any one knows if it will be fine to transfer ASCII files in Binary mode?
I know transfering Binary as ASCII will not work but I want to know if some one already have experince with the oppsite?

I already tested by tranfering a text file (ASCII) using binary mode and it looks fine (No curroption).. But i don't know what will happen if i tranfered a big file or other ASCII file (non txt)..

your help highly appreciated.

Cheers,

always Face your Fears...
More
15 years 7 months ago #29833 by TheBishop
As far as I know it should work ok
More
15 years 7 months ago #29839 by S0lo
Replied by S0lo on topic Re: FTP, ACSII & Binary
That's how I understand it too, binary should work for any thing. It sends bytes data in it's 8-bit format.

FTP was developed at a time when typical speeds were very low (at 110 to 300 bits per second). Since ASCII only uses 7 bits, long TEXT files could be transmitted more quickly by NOT sending all the unused bits. But now it doesn't matter at today's speeds.

So as far as I know, ASCII mode sends 7bits per byte neglecting the 8th bit. This works for simple ASCII text files. But for any other files (ie. .doc .pdf .exe etc) it won't work as you mentioned. Besides, ASCII mode does some character formatting when sending between different platforms. For example, a Windows machine receiving a file from a Unix machine will replace the line feeds with carriage return-line feed pairs.

You might as well keep it on AUTO mode, the FTP client will know what mode to use for each file.

Studying CCNP...

Ammar Muqaddas
Forum Moderator
www.firewall.cx
Time to create page: 0.127 seconds