If you set the transfer method to binary, the file is sent as it is, without
changing anything.
If you set it to ascii, the end of line character is set to lf for
Unix/Linux, crlf for Windows, and cr for Mac.

If your FTP program or the FTP library you use is not doing this correctly,
this means that it could have a bug because  it might not recognize well the
operating system and put the correct end of line.

But.... transfer the files in binary mode, then change the end of line to be
the correct end of line character for your system... if it is not possible
otherwise.


Teddy,
Teddy's Center: http://teddy.fcc.ro/
Email: [EMAIL PROTECTED]

----- Original Message -----
From: "Peter Fleck" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Monday, August 04, 2003 7:41 PM
Subject: RE: Preserve line endings via ftp


Setting the transfer type to binary didn't work.

Reading perldoc Net::FTP did:

        ASCII is the default
        type, and indicates that the sender of files will
        translate the ends of lines to a standard representation
        which the receiver will then translate back into their
        local representation.

So I kept the unix line endings on the file and ftp'd to the Novell
server and the DOS line endings appeared over there.

For the record, this worked with both 'binary' and 'ascii' translations.


>------------------------------------------------
>On Mon, 4 Aug 2003 10:47:42 -0500, Peter Fleck <[EMAIL PROTECTED]> wrote:
>
>>  Greetings,
>>
>>  I'm using Net::FTP to move a file from a Linux server to a Novell
>>  server. Before I move the file, I have perl change all the line
>>  endings from unix-based to DOS-based. The line endings seem to get
>>  lost during the ftp process and end up as unrecognized characters (at
>>  least when viewing the text file from my Mac).
>>
>>  Trying to figure out how to change this so I can preserve those endings.
>
>Try setting the transfer type to binary. There is a 'binary' method...
>
>http://danconia.org
>
>--
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]


--
Peter Fleck
Webmaster | University of Minnesota Cancer Center
Dinnaken Office Bldg.
925 Delaware St. SE
Minneapolis, MN  55414
612-625-8668 | [EMAIL PROTECTED] | www.cancer.umn.edu
Campus Mail: MMC 806

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to