sc-im
sc-im copied to clipboard
Support escaped double-quotes.
From RFC-4180
If double-quotes are used to enclose fields, then a double-quote appearing inside a field must be escaped by preceding it with another double quote.
Therefore, a CSV file with the following content should be supported in SC-IM:
foo,above,bar
foo,My daughter said ""hello"" this morning.,bar
foo,below,bar
On opening a file with such text, SC-IM currently throws a "syntax error". Then after pressing Enter the file opens, but the cell with the escaped double-quote is truncated. The remaining cells display properly.
Screenshot of SC-IM displaying a file with the text in the above comment:

Yes. I won't call this a bug.Sc-im is just not rfc4180 compliant.There was an old issue regarding this. Sc-im does not rely on a csv library that can handle this cases. (If you find any for C, please let me know).Nevertheless, please feel free to open a discussion so other can vote on this.. Let's call it enhancement.thanks
Andres,
I use https://github.com/rgamble/libcsv This one can handle such things.
rgds Roman
Thank you Roman. Will take a look at it
This problem is not specific to csv import: it seems sc-im cannot display cells with doublequotes in them and considers this a syntax error in the sc format.
For example, I get the same when I try to insert a cell with a doublequote in sc-im, and with other imports.
@pjvm742 could it be that this also happen on sc?
could it be that this also happen on sc?
In sc, when inserting a text value you have to give it in doublequotes, and an unescaped doublequote inside the value gives a similar error as in sc-im.
I did find out that you can escape doublequotes with a backslash, e.g.
inserting "\"what?\"" works and displays as "what?". This also
works in sc-im.