[Tellico-users] CSV Output file has issues
Robby Stephenson
robby at periapsis.org
Thu Mar 28 03:58:30 UTC 2013
On 03/27/2013 12:25 PM, Matthew Soffen (tellico) wrote:
> I'm currently trying to import an exported copy of my Book Collection (all
> 1800+ books) for use on my Cell Phone.
>
> When I tried to import the exported CSV file it choked.
>
> I noticed then that nothing is quoted.
>
> For example, This is one title/etc. for the book:
> Daughter of the Blood (Black Jewels, Book 1)
>
> Guess what happens ? The title gets split on the , in the Series/# part.
>
> Can we add " around all text fields in the DB ?
Indeed. From poking at it, it looks like I accidentally dropped one of
the escapeText() calls in the CSV exporter while fixing a different bug
a while back. You're the first to notice...
> I've been working with CSV style files for 15 years now and the general
> rules of thumb are
> 1) Replace " in the text with ""
> 2) Quote All Text Fields
> 3) If you use the field as a number, don't quote it. If its used as text
> (like an ISBN), then quote it.
>
> What do you think ? (Or even quote around the # fields too, because that
> generally doesn't cause issues).
The intent is to follow RFC 4180 which allows to all fields being quoted
but doesn't require it. Tellico's intent is to quote the value if it
contains the delimiter, and as you say, replace existing quotation marks
with doubled quotes.
I haven't done rigorous testing against RFC 4180, though, so there may
be edge cases that Tellico might fail. If you hit one, let me know.
I noted this as bug 317473, so I can track it. Just fixed it in git,
ready for the next release sometime. Thanks for letting me know.
Robby
More information about the tellico-users
mailing list