[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

[MacPerl] Re: [off topic] Text File Transfer Problems



At 02:17 +1000 on 1/8/97, Jon S. Jaques wrote:
[quoted someone who's name slips my mind]
>> "TEXT" transfer programs typically attempt to make adjustments when they
>> pass files from one environment to another and they often get it wrong.
>
>I think "often" is actually closer to 80% (or so) of the time! How "evil"
>that these FTP prog.s don't have an ultra simple way of forcing ASCII
>"correctness" on all files with allowed ASCII extensions.

They do. AFAIK, they convert text files to "network" format in transfers
(where end of lines are coded as both characters - LF&CR or some such),
then converted back by the other end. That way, this end worries only about
what it considers to be "end of line", and *that* end worries only about
what *it* considers to be "end of line".

Just be sure you put your FTP client in "ASCII" mode, not "Binary" mode,
when sending (native) text files. If the text you're reading on a Mac came
off a DOS disk in DOS native format, edit it with BBEdit to make it
"native" otherwise the Unix machine will chuck a fit.

>> TEXT ftp is fairly reliable.
>
>Humbug.

I write scripts in MacPerl, save them to DOS disk and FTP them to a
Slowaris host. Works beautifully. The only reason they go to DOS disk is
because I'm using a PowerBook 180, which doesn't have Ethernet. This mode
of transfer is the only time I've ever had to worry about the end-of-line
problem. I save the files to DOS disk from BBEdit with the "DOS" formatting
option.

Apple PC Exchange does not automatically convert text files during
transfers. It only provides the means to mount a DOS formatted floppy and
map DOS file extensions to Macintosh creator/type codes.

I also upload large HTML files and PERL scripts to a Linux host from that
Macintosh using Anarchie in text mode. That works fine too. I edit the file
using BBEdit Lite in Macintosh mode, then FTP the file to the Linux host.
Over there, I'll make small edits using pico. Every so often, I'll FTP the
whole site back to my Mac and contiue editing.

Then it gets really confusing, because I also maintain that site with
Microsoft FrontPage on a Windows 95 box. The only problems I've had so far
are with FrontPage setting all my executables to non-executable.

The only problems I've had are when I try transferring text files in Binary
mode, or executables/compressed files in Text mode.

When you transfer an executable or compressed file in Text mode, most FTP
packages will warn that they "send xxx bare linefeeds in ASCII mode",
meaning that there was no text on a whole lot of lines, just a whole heap
of garbage characters.

The only FTP package I use on Windows 95 is the built-in command-line based
FTP package (called, funnily enough, "ftp.exe"). I use Anarchie on the Mac.

General rule: if you're sending a native text file, use ASCII, if you're
sending something that is not a native text file, use Binary.

Sorry to crowd the list with this.
-Alex

Windows 95: n. 32 bit extensions and a graphical shell for a 16 bit patch
to an 8 bit operating system originally coded for a 4 bit microprocessor,
written by a 2 bit company.



***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch