Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8373049
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T14:34:54+00:00 2026-06-09T14:34:54+00:00

I program a FTP addon (using python’s ftplib) and I wonder what would be

  • 0

I program a FTP addon (using python’s ftplib) and I wonder what would be the best way to determine, if it should use Binary or ASCII transfer method for a given file. In other words “automatic” transfer mode.

I started looking into this as I got issue report about double lines and googling turned out that binary mode should be responsible [1][2].

It might be using whitelisting or blacklisting extension supposed to be binary or ascii, but it might not be present and of course a question which of the methods (wl x bl,b x a) to use then. It does not sound solid way enough (imperfect list, lack of extension).

-> question: For a given file what’s a solid way to choose either binary or ascii transfer mode? (if there is any…)
Thank you

[1] http://www.seo-creative.co.uk/tutorials/ftp-client-giving-you-double-line-breaks/
[2] http://www.chami.com/html-kit/support/docs/pages/h000114.html

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T14:34:56+00:00Added an answer on June 9, 2026 at 2:34 pm

    First of all, you need to inspect the file for BOM marks which identify UTF16 or UTF8. If they are present, than with 99,9% probability the file is a text file.

    Next you can scan the file and check if it contains characters with codes less than 32 and not 9, 10 and 13 (TAB, LF, CR). If there are no such characters in the file, then the file is probably a text. But there’s no guarantee here OR the user can explicitly request the file to be transferred in binary mode.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Now I use my own Java FTP program to ftp objects from my PC
I am starting an FTP session using: C:\Program Files\FTP Server\msftpsrvr.exe -start Now I want
Possible Duplicate: What Java FTP client library should I use? I am looking for
i user APACHE with PHP. if we use FTP program like filezilla. we will
I have created a small FTP program, it's just for my own use, so
Using below program i am able to upload zip file on ftp server. But
I'm playing with using FTP to periodically upload small data files from a program
I have to create a program that would upload business data to the FTP
In a .NET C# program, is it easy to transition from FTP to SFTP?
I need to write a program in F# that should push files to an

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.