View Single Post
Old 01-04-2011, 09:26 AM   #5
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 12,475
Karma: 8025702
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
The comma/| stuff comes from how calibre manipulates lists of things. In list form, each 'thing' is complete and self contained. In string form, all of the 'things' are put together, separated by commas. The two are intended to be interchangeable, which creates a problem if a 'thing' contains a comma. "Bar, Foo" would become "Bar" "Foo".

For tags, the problem is avoided by forbidding commas in a tag. This doesn't work for authors, so the problem is avoided by converting commas to vertical bars.

This process is rather a pain inside calibre, because we need to be aware of what form we are using. In early versions of S/R, it was too complicated in search/replace to deal with both the interchange of single- and multiple-valued fields and bar conversion. That could be changed now that S/R is more intelligently dealing with multiples using the user-settable separator. I will look at it.

Probably more than you wanted to know.
chaley is offline   Reply With Quote