Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
ange-ftp using binary mode
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  11 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Ken Goldman  
View profile  
 More options Feb 10 2012, 4:55 pm
Newsgroups: gnu.emacs.help
From: Ken Goldman <kg...@watson.ibm.com>
Date: Fri, 10 Feb 2012 16:55:49 -0500
Local: Fri, Feb 10 2012 4:55 pm
Subject: ange-ftp using binary mode
I have to use ange-ftp because the server I'm connecting to doesn't run
ssh.  When I transfer, it uses binary, which does not work.  The server
is a mainframe and likely uses ebcdic.

If I ftp from the command line in ascii mode, the file comes over to
Windows correctly.  If I enter the commands by hand in the ange-ftp,
setting ascii, it works.

How do I tell ange-ftp to use ascii?

I set ange-ftp-binary-file-name-regexp to "", even though the .cpp file
wasn't in the regexp.

Here's a trace.

quote mdtm /SYSTEM/home/suimgvb/ken/utils.cpp
501 command aborted -- FTP server not configured for MDTM
type binary
200 Representation type is Image
get /SYSTEM/home/suimgvb/ken/utils.cpp
c:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/ange-ftp4280SMK
200 Port request OK.
125 Sending data set /SYSTEM/home/suimgvb/ken/utils.cpp

250 Transfer completed successfully.
ftp: 1407 bytes received in 0.01Seconds 93.80Kbytes/sec.
type ascii
200 Representation type is Ascii NonPrint
quote mdtm /SYSTEM/home/suimgvb/ken/utils.cpp
501 command aborted -- FTP server not configured for MDTM


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Eli Zaretskii  
View profile  
 More options Feb 11 2012, 2:01 am
Newsgroups: gnu.emacs.help
From: Eli Zaretskii <e...@gnu.org>
Date: Sat, 11 Feb 2012 09:01:12 +0200
Local: Sat, Feb 11 2012 2:01 am
Subject: Re: ange-ftp using binary mode

> From: Ken Goldman <kg...@watson.ibm.com>
> Date: Fri, 10 Feb 2012 16:55:49 -0500

> I have to use ange-ftp because the server I'm connecting to doesn't run
> ssh.  When I transfer, it uses binary, which does not work.  The server
> is a mainframe and likely uses ebcdic.

Are you using ange-ftp via "C-x C-f"?  If so, tell Emacs to decode the
file, as in "C-x RET c ebcdic-us RET C-x C-f whatever RET".

If you use some other command, again prefix that command with
universal-coding-system-argument ("C-x RET c") to tell it to use
EBCDIC, or whatever is right for those files.

IOW, just imagine the file was on your local disk, and do the same.
You cannot tell disk I/O to "use ascii", can you?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Michael Albinus  
View profile  
 More options Feb 14 2012, 8:54 am
Newsgroups: gnu.emacs.help
From: Michael Albinus <michael.albi...@gmx.de>
Date: Tue, 14 Feb 2012 14:54:05 +0100
Local: Tues, Feb 14 2012 8:54 am
Subject: Re: ange-ftp using binary mode

Ken Goldman <kg...@watson.ibm.com> writes:
> I have to use ange-ftp because the server I'm connecting to doesn't
> run ssh.  When I transfer, it uses binary, which does not work.  The
> server is a mainframe and likely uses ebcdic.

> If I ftp from the command line in ascii mode, the file comes over to
> Windows correctly.  If I enter the commands by hand in the ange-ftp,
> setting ascii, it works.

> How do I tell ange-ftp to use ascii?

> I set ange-ftp-binary-file-name-regexp to "", even though the .cpp
> file wasn't in the regexp.

`ange-ftp-binary-file-name-regexp' tells, which files are to be
transferred in binary mode. "" matches ALL files. So you must set it to
a regexp, which doesn't match any file name, like "^$" (which is the
empty file name).

Best regards, Michael.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ken Goldman  
View profile  
 More options Feb 15 2012, 2:59 pm
Newsgroups: gnu.emacs.help
From: Ken Goldman <kg...@watson.ibm.com>
Date: Wed, 15 Feb 2012 14:59:43 -0500
Local: Wed, Feb 15 2012 2:59 pm
Subject: Re: ange-ftp using binary mode
On 2/14/2012 8:54 AM, Michael Albinus wrote:

I tried this, but it still transfers in binary.

~~~~~~~~

ange-ftp-binary-file-name-regexp is a variable defined in `ange-ftp.el'.
Its value is "^$"

~~~~~~~~~~
ftp trace:
~~~~~~~~~~

quote mdtm /SYSTEM/home/suimgvb/ken/client.cpp
501 command aborted -- FTP server not configured for MDTM
type binary
200 Representation type is Image
get /SYSTEM/home/suimgvb/ken/client.cpp
c:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/ange-ftp5768MyT
200 Port request OK.
125 Sending data set /SYSTEM/home/suimgvb/ken/client.cpp

250 Transfer completed successfully.
ftp: 38381 bytes received in 0.08Seconds 485.84Kbytes/sec.
type ascii
200 Representation type is Ascii NonPrint
quote mdtm /SYSTEM/home/suimgvb/ken/client.cpp
501 command aborted -- FTP server not configured for MDTM


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ken Goldman  
View profile  
 More options Feb 15 2012, 3:17 pm
Newsgroups: gnu.emacs.help
From: Ken Goldman <kg...@watson.ibm.com>
Date: Wed, 15 Feb 2012 15:17:26 -0500
Local: Wed, Feb 15 2012 3:17 pm
Subject: Re: ange-ftp using binary mode
On 2/11/2012 2:01 AM, Eli Zaretskii wrote:

I tried this and it is somewhat better.  I can see the text but all the
newline appears as \205, [ as \255 and ] as \275.

I think I simply want to tell ange-ftp to use ascii, not binary, but
nothing I tried works.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Eli Zaretskii  
View profile  
 More options Feb 15 2012, 3:49 pm
Newsgroups: gnu.emacs.help
From: Eli Zaretskii <e...@gnu.org>
Date: Wed, 15 Feb 2012 22:49:36 +0200
Local: Wed, Feb 15 2012 3:49 pm
Subject: Re: ange-ftp using binary mode

> From: Ken Goldman <kg...@watson.ibm.com>
> Date: Wed, 15 Feb 2012 15:17:26 -0500

> I tried this and it is somewhat better.  I can see the text but all the
> newline appears as \205, [ as \255 and ] as \275.

Maybe it's not EBCDIC after all.

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ken Goldman  
View profile  
 More options Feb 15 2012, 4:25 pm
Newsgroups: gnu.emacs.help
From: Ken Goldman <kg...@watson.ibm.com>
Date: Wed, 15 Feb 2012 16:25:22 -0500
Local: Wed, Feb 15 2012 4:25 pm
Subject: Re: ange-ftp using binary mode
On 2/15/2012 3:49 PM, Eli Zaretskii wrote:

>> From: Ken Goldman<kg...@watson.ibm.com>
>> Date: Wed, 15 Feb 2012 15:17:26 -0500

>> I tried this and it is somewhat better.  I can see the text but all the
>> newline appears as \205, [ as \255 and ] as \275.

> Maybe it's not EBCDIC after all.

If it's not, it's close, as your suggestion to use
ebcdic-us made it much better.

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ken Goldman  
View profile  
 More options Feb 15 2012, 4:30 pm
Newsgroups: gnu.emacs.help
From: Ken Goldman <kg...@watson.ibm.com>
Date: Wed, 15 Feb 2012 16:30:16 -0500
Local: Wed, Feb 15 2012 4:30 pm
Subject: Re: ange-ftp using binary mode
On 2/10/2012 4:55 PM, Ken Goldman wrote:

> I have to use ange-ftp because the server I'm connecting to doesn't run
> ssh. When I transfer, it uses binary, which does not work. The server is
> a mainframe and likely uses ebcdic.

> If I ftp from the command line in ascii mode, the file comes over to
> Windows correctly. If I enter the commands by hand in the ange-ftp,
> setting ascii, it works.

> How do I tell ange-ftp to use ascii?

Following up my own post, I edited ange-ftp.el and changed 'binary' to
'ascii'.  Files now come across absolutely perfectly.

I know that's an awful hack, but it's a proof of concept.  Now, how do I
convince ange-ftp to use ascii without editing the elisp source?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Stefan Monnier  
View profile  
 More options Feb 15 2012, 6:06 pm
Newsgroups: gnu.emacs.help
From: Stefan Monnier <monn...@iro.umontreal.ca>
Date: Wed, 15 Feb 2012 18:06:32 -0500
Local: Wed, Feb 15 2012 6:06 pm
Subject: Re: ange-ftp using binary mode

> I know that's an awful hack, but it's a proof of concept.  Now, how do
> I convince ange-ftp to use ascii without editing the elisp source?

I don't think we provide such a feature: Emacs is usually much better at
handling various forms of text representations than FTP.  Obviously, not
in your case, because it seems that the file you're transferring is using
a format that Emacs does not know.
If you can figure out what that format is, we could easily add the
corresponding coding-system to Emacs.

        Stefan


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Michael Albinus  
View profile  
 More options Feb 16 2012, 5:42 am
Newsgroups: gnu.emacs.help
From: Michael Albinus <michael.albi...@gmx.de>
Date: Thu, 16 Feb 2012 11:42:24 +0100
Local: Thurs, Feb 16 2012 5:42 am
Subject: Re: ange-ftp using binary mode

Which Emacs version are you running?

Last year, there was a bug report about ange-ftp's binary mode, see
<http://debbugs.gnu.org/cgi/bugreport.cgi?bug=7383>. IIRC, it was about
ange-ftp always using binary mode, when your local system is MS
Windows. This is fixed meanwhile.

Chances are good, that a prerelease of Emacs 24.1 works for you out-of-the-box.

Best regards, Michael.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ken Goldman  
View profile  
 More options Feb 23 2012, 2:59 pm
Newsgroups: gnu.emacs.help
From: Ken Goldman <kg...@watson.ibm.com>
Date: Thu, 23 Feb 2012 14:59:41 -0500
Local: Thurs, Feb 23 2012 2:59 pm
Subject: Re: ange-ftp using binary mode
On 2/16/2012 5:42 AM, Michael Albinus wrote:

I looked at the bug reports, but they seem to be cases where people
__wanted__ binary mode.  I have the opposite issue.  I always want ASCII
mode so ftp will do the EBCDIC <-> ASCII conversion.

I'm running 23.1.1.  I won't risk a pre-release when I have a source
code hack that works.  I'll retest when 24 goes into production.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »