Re: Formatting ASCII to be read by Windows NotePad
- From: Bill H <bill@xxxxxxxxx>
- Date: Fri, 4 Jul 2008 08:45:12 -0700 (PDT)
On Jul 4, 10:56 am, Sherman Pendley <spamt...@xxxxxxxxxxx> wrote:
"Waylen Gumbal" <wgum...@xxxxxxxxx> writes:
Sherman Pendley wrote:
"Waylen Gumbal" <wgum...@xxxxxxxxx> writes:
Sherman Pendley wrote:
UnRiel <bdwh...@xxxxxxxxx> writes:
I have a nice PERL script I use to generate CISCO configurations
No need to shout - neither Perl nor Cisco are acronyms.
I don't think two all-caps words in a sentence that's otherwise
properly cased really constitutes shouting.
It's shouting those words.
Not in that context it wasn't.
You must be new to usenet. All caps is considered shouting here,
unless that's the correct spelling of a word or acronym, and as I
said, that applies to neither Perl nor Cisco.
Transfer the files in text mode. That will translate the line
endings as needed.
While it is common to use ASCII mode one should still take care, as
this isn't always guarenteed to work. There used (still are?) issues
with this when uploading to MacOS based servers, for example.
Such as?
I've had issues in the past uploading to a MacOS based ftp server
(remember that Mac uses \r for line endings, where as Win32 uses \r\n,
and most Linux and Unix systems use \n)
I've been using a Mac for ten years, and I wrote the readme.macosx
that's included with Perl. So spare me the lectures.
Yes, I do remember that MacOS once, many years ago when "classic"
MacOS was relevant, used to use \r. Mac OS X uses \n, just like any
other Unix, as documented here:
<http://developer.apple.com/documentation/MacOSX/Conceptual/BPFileSyst...>
<http://tinyurl.com/58w7dy>
This ain't your grandpa's Mac any more. Try to keep up, OK?
and when uploading in "ASCII"
mode, the line endings became \n instead of \r (this happened with 3
different ftp clients, including the command line ftp client, so I
attribute the problem likely was the server wasn't properly telling the
client what sort of platform it was (what line endings it used.)
You're beginning to try my patience. This is little more than "it
didn't work." What *specific* server app were you connecting to? What
client were you using? What version of both?
Note that according to RFC 959, the client sends \r\n pairs in ASCII
mode, which the server translates to its native format. Because a
"neutral" format is used in transit, neither client nor server is
aware, nor needs to be aware of the native format used by the other,
by design. Your attribution of the problem, as you wrote it above,
makes no sense.
Do you have anything *useful* to say here? Do you actually understand
the FTP protocol? Did you actually debug the problem you had? Or are
you basically just saying "I had a problem in the past, and it must
have been the Mac at the other end because Macs are weird"?
sherm--
--
My blog:http://shermspace.blogspot.com
Cocoa programming in Perl:http://camelbones.sourceforge.net- Hide quoted text -
- Show quoted text -
I'll jump on the Mac ftp issue bandwagon and even make it pertain to
perl. I have a couple of clients using DreamWeaver in OS X that,
whether due to settings or the OS, when they post their webpages or
perl scripts to one of my linux servers they wind up with the "\r" in
the scripts and a blank line after every line in the html files. The
servers themselves don't care and it all works good, but if I then d/l
the files via ftp (ascii mode) to the pc the perl scripts loose all
line feeds (i have to open and save using edit.com to get them back)
and the extra blank lines in html stay are still there. Now one of
these same clients has used fetch (or the OS X equivalent) and this
problem went away, so it may be a Dreamweaver issue.
I also know, on a few of the Mac servers that I have had the "joy" of
moving websites off of, when d/ling the files via ftp, no setting
change (ascii or binary) will ever fix the lack of line feeds in the
files I receive from the Mac.
Bill H
.
- Follow-Ups:
- Re: Formatting ASCII to be read by Windows NotePad
- From: Sherman Pendley
- Re: Formatting ASCII to be read by Windows NotePad
- References:
- Formatting ASCII to be read by Windows NotePad
- From: UnRiel
- Re: Formatting ASCII to be read by Windows NotePad
- From: Sherman Pendley
- Re: Formatting ASCII to be read by Windows NotePad
- From: Waylen Gumbal
- Re: Formatting ASCII to be read by Windows NotePad
- From: Sherman Pendley
- Re: Formatting ASCII to be read by Windows NotePad
- From: Waylen Gumbal
- Re: Formatting ASCII to be read by Windows NotePad
- From: Sherman Pendley
- Formatting ASCII to be read by Windows NotePad
- Prev by Date: Re: Unwanted output using croak with eval
- Next by Date: Re: FAQ 8.28 How can I call backticks without shell processing?
- Previous by thread: Re: Formatting ASCII to be read by Windows NotePad
- Next by thread: Re: Formatting ASCII to be read by Windows NotePad
- Index(es):
Relevant Pages
|
|