[Info-vax] CRTL and RMS vs SSIO
Arne Vajhøj
arne at vajhoej.dk
Sat Oct 9 19:51:55 EDT 2021
On 10/6/2021 9:45 PM, Lawrence D’Oliveiro wrote:
> On Thursday, October 7, 2021 at 2:18:57 AM UTC+13, osuv... at gmail.com
> wrote:
>> Open source software ports often comes with the restriction that it
>> only works with stream-LF files.
>
> I would say that’s partially true. Typically there are options to
> treat files as “text” or “binary”. A “binary” file is just a stream
> of arbitrary 8-bit bytes, which are supposed to be read or written
> without any imposition of record boundaries, sector-size rounding or
> special treatment of any byte values. A “text” file is assumed to be
> broken up into lines. It is true that LF is the traditional Unix line
> delimiter. But enlightened toolkits like Python are capable of
> reading text files in “universal newline” mode, so for example if you
> copy a text file created on MS-DOS (line delimiter = CR+LF, because
> CP/M did it that way, for no rational reason) in binary mode onto a
> Linux system, your Python text-processing script running on the
> latter can cope with it without a hiccup.
Python on VMS doesn't really have much of a choice if it relies
on C IO - it will have to follow VMS C IO's conventions for how
to deal with different record formats.
(I have not checked the VMS Python source code, but I assume
that it uses C IO calls and do not have some VMS specific
code making direct RMS calls)
Arne
More information about the Info-vax
mailing list