Format of options file

RS richard22j at zoho.com
Sat Mar 3 16:24:12 PST 2018



On 03/03/18 23:44, MacFH - C E Macfarlane wrote:
> Please see below ...
> 
> On 03/03/2018 22:54, Bernard Peek wrote:
>>
>> On 03/03/18 17:33, James Scholes wrote:
>>> RS wrote:
>>>> The Windows download_history file seems to work correctly.  I hope I 
>>>> don't need to edit it.
>>>
>>> You've probably edited your options file by hand in the past, 
>>> resulting in a mixture of weird line endings from a Windows editor, 
>>> and appropriate ones when get_iplayer itself has updated it.  That's 
>>> just my guess after going through exactly the same thing recently. 
>>> I'd bet you probably don't go editing your download_history file by 
>>> hand very often so it's most likely fine.

Thanks for all the comments.  I don't remember ever having edited the 
options file manually.  Until today I did not even know the format.  In 
any event I have now looked at the original Windows options file.  It 
uses 0x0D0A (CRLF) as a line terminator throughout.  The 0x0A 
terminators have been introduced by running --prefs-add in Linux but it 
does not replace all the 0x0D0A terminators.

I have also just looked at the last few entries in the Windows 
download_history. They have 0x0A as a line terminator.  I used gedit to 
save a manageable number of entries, so it is possible gedit changed the 
line terminators.  To check that I edited and saved the Windows options 
file with gedit.  The 0x0A0D line terminators were preserved.

If download_history can use 0x0A as a line terminator in both Linux and 
Windows I can't see why the options file should not also.  The options 
file is internal to get_iplayer.  Users do not need to edit it directly.

Ralph mentioned POSIX but as far as I can see from the Wikipedia article 
there is a lot more to POSIX than converting 0x0A0D to 0x0A.  Cygwin is 
given as one example.
>>

> But as the OP is changing over to Linux, perhaps the de facto standard 
> 'dos2unix' would be a more appropriate recommendation. 

Thanks for the suggestion but I don't think I need to convert the 
download_history file (although gedit complained about invalid UTF-8 
characters) and thanks to Ralph's command I now have an options file 
which consistently uses 0x0D as a line terminator.

Best wishes
Richard





More information about the get_iplayer mailing list