Format of options file
RS
richard22j at zoho.com
Mon Mar 5 05:46:10 PST 2018
On 05/03/2018 13:19, Ralph Corderoy wrote:
>
>> My approach would be to ignore the CR or to recognise three possible
>> end of record markers, but it seems that is not allowed.
>
> It certainly is allowed. It would be the Richard Text File Format.
> Programs could code to handle it. More precise specification would be
> required. Is the first line-ending encountered from the start of the
> file the one that must be used thence? Or may each line differ?
Hi Ralph
I suggested ignoring CR because they are there. Ideally they would not
be there. The files are internal to get_iplayer so they can be in any
format. I would have thought it sensible to use LF as a line terminator
for get_iplayer's internal files across all operating systems. The
question is how the CR are getting into the files in Windows.
Since the script uses
print \n
the answer must be that Perl is translating \n as CR LF in Windows. If
Perl can then handle the variants portably with chomp VARIABLE that's
fine, but it doesn't seem to be working properly at the moment.
Otherwise the solution may be to replace \n with \015.
Best wishes
Richard
More information about the get_iplayer
mailing list