[ANSWERED] What is a safe separator character for --listformat format strings?
#1
Are there any characters (or character sequences) that are guaranteed not to be included in the metadata fields output by listformat? For example, angle brackets, ampersands, or something that's guaranteed to be escaped?

I'd like to use something as a separator, so that it can be easily machine-parsed, like that shown below. However, if there's any chance the separator could appear within a field, it could mess up the parsing.
Code:
flypig@delphinus:~$ get-iplayer --nocopyright --type=radio questions \
                               --listformat "<pid>|<name>|<duration>"

Matches:
b0b01xnk|Any Questions?|3000
b0b0xllc|Any Questions?|3000
b0b1tmbb|Any Questions?|3000
b0b2mrxy|Any Questions?|3000
b0b3g001|Any Questions?|3000
w3cswthd|World Questions|3240
INFO: 6 matching programmes
#2
The separator in the cache is hex 7C.
Isn't it easier to work on (a copy of) the cache?
I simply took a copy, changed 7C to 09, and imported as a csv file into OpenOffice.
Perhaps I've misunderstood the question.
#3
Pipe symbol should be fine. That's why it is used in the cache files.
#4
Thank you both, that's really helpful. I'll use the pipe then.

@GeoffSmith, you're almost certainly right, it could well be easier to work with the cache, but for historical reasons I'm using the output of a search command and I'd need to properly understand the characteristics of the cache before switching to using that instead (a task for another day).


Possibly Related Threads...
Thread Author Replies Views Last Post
  How do I omit separator in file prefix if "episode" substitution parameter is empty? garcia 2 1,342 22-08-2017, 05:30 PM
Last Post: garcia
  Is there a valid list of fields for use with --listformat? ely 4 2,006 29-06-2017, 03:54 PM
Last Post: ely