Subject: Re: Text file type hint proposal for filexfer

From: [email-masked] (Niels Möller)
Date: 05 Oct 2004 15:19:24 +0200

Richard Whalen <[email-masked]> writes:

> Your impression is correct.  Many text files on VMS do not store the line
> break sequence.

Is it possible for a VMS application (in particular, an sftp server on
VMS), to reliably figure out wether or not given file is a "text file"
using this record format, or a binary file (whatever that means on
VMS)?

That is, can the proposed file mode hint be reliably supported on VMS?

/Niels

---

From: Richard Whalen <[email-masked]>
Date: Tue, 5 Oct 2004 08:43:25 -0400

> From: Jacob Nevins [mailto:[email-masked]]
> Sent: Monday, October 04, 2004 5:36 PM
> To: [email-masked]
> Subject: Re: Text file type hint proposal for filexfer
> 
> 
> > One other observation:
> > 
> > If you have this attribute, *and* there is some way of knowing the
> > server's line end convention,
> 
> Well, there's the rub, really. How do you do that? You can't 
> rely on the
> "newline" extension being present, or if it is, corresponding 
> with what
> the server will send in binary mode.
> 
> Also: I'm not familiar with VMS, but the impression I have is 
> that line
> breaks there are not represented by a byte sequence at all, but rather
> by something that it's not possible to squirt down an SFTP "binary"
> connection. Hence our having an explicit text mode in SFTP in 
> the first
> place.

Your impression is correct.  Many text files on VMS do not store the line
break sequence.  Files created with a text editor are often stored as
records with a 2 byte count at the start of each record and file attributes
that state that a carriage-return, linefeed sequence will follow each line
when it is displayed on a terminal or printed.  It is also possible for VMS
to store a text file as a stream of bytes (equivalent to the way that Unix
does), with a more complex record structure that includes carriage control
with each record, or as fixed length records in which no carriage control
characters are stored as they can be inferred by the file organization.

This is the basis behind the argument for requesting the server to open
a file in text mode and present it in a canonical way as has been done
with FTP.

----------------------
Richard Whalen
Process Software

---

From: der Mouse <[email-masked]>
Date: Sun, 10 Oct 2004 00:41:18 -0400 (EDT)

>> Your impression is correct.  Many text files on VMS do not store the
>> line break sequence.
> Is it possible for a VMS application (in particular, an sftp server
> on VMS), to reliably figure out wether or not given file is a "text
> file" using this record format, or a binary file (whatever that means
> on VMS)?

Yes.

Or at least, it was back when I used VMS (>10 years ago).  I would
assume that things haven't changed that much, but that's an assumption.

It would mean VMS-specific code in the daemon, of course.

/~\ The ASCII				der Mouse
\ / Ribbon Campaign
 X  Against HTML	       [email-masked]
/ \ Email!	     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B