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

  • SEARCH
  • Home
  • 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 7676587
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T17:14:00+00:00 2026-05-31T17:14:00+00:00

i used ftp-get function to download images from server. But by accident i used

  • 0

i used ftp-get function to download images from server. But by accident i used FTP_ASCII mode, so i have a problem. Images couldn’t be read, there is some error.

I have no option to download images again.
Anyone knows how to convert these files into binary form, or how to repair these files?

  • 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-05-31T17:14:02+00:00Added an answer on May 31, 2026 at 5:14 pm

    There is no guaranteed way to repair the files because of the nature of the way ASCII mode works compared to Binary mode.

    FTP ASCII mode is designed to convert line endings to the appropriate type between the source and destination operating systems. The most common conversion that is done here is \n (0x0a) becomes \r\n (0x0d0a) and vice versa, when transferring between *nix and Windows.

    Lets say that we are transferring some images from a Linux server to a Windows machine, and we accidentally use ASCII mode. The FTP client is looking out for any \n sequences in the incoming data and converting them to \r\n in the data it saves to disk. This means that anywhere in the binary data there is a 0x0a it becomes 0x0d0a in the new data. But it won’t convert an existing \r\n to \r\r\n – this will be left intact. No problem, you might think, I’ll just convert all the 0x0d0a back to 0x0a and the file will be repaired. But wait… if the existing \r\n sequences weren’t converted, then they will be converted the wrong way in this new conversion pass.

    The long of the short of it is you data is irrevocably corrupted. The only 100% guaranteed way to get the correct data back is to copy them off the server again, in binary mode.

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

Sidebar

Related Questions

I am downloading zip files from FTP server using PHP ftp function.I used binary
I have used PHPStorm frequently to download files locally with the use of FTP,
In the past I used an ftp server, connected via ftp from the client
I have a problem uploading files with move_uploaded_file(src, dest) . Uploadify is used to
I have xml files been imported onto an FTP server. This is stored in
I did a script, which has to load a file from a ftp-server then
I have developed a recursive FTP-download script, in PHP5, that allows you to select
I have used this code import org.apache.commons.net.ftp.FTPClient; import java.io.FileInputStream; import java.io.IOException; public class FTPClientExample
I'm trying to use wget in bash to get a folder from my ftp
I used following code for downloading XML file from ftp to android phone memory

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.