Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: unwanted text formatting with Archive::zip

by larryl (Scribe)
on Mar 15, 2001 at 23:30 UTC ( #64758=note: print w/ replies, xml ) Need Help??


in reply to unwanted text formatting with Archive::zip

When you transfer a file in ASCII/text mode, the ftp client will normally convert carriage return and linefeed characters as needed for the destination system. Your ftp is not adding any formatting, it is simply preserving what is already in the files on the Linux side. You are correct in transferring the zip file as binary, however the file *within* the zip file are still in their original format. You either need to convert them before adding them to the zip file, or convert them after they hit the NT side.

Don't know for sure about Linux, but on my Solaris machine there is a "unix2dos" command which does that type of conversion. If you want to try converting the files yourself before zipping, you can probably get away with something like s/\n/\r\n/g if it's plain text.


Comment on Re: unwanted text formatting with Archive::zip
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://64758]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (7)
As of 2014-09-21 02:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (166 votes), past polls