There’s a document that defines the text/csv
format, RFC 4180
CSV is a notoriously flexible format, but the input you’ve described is not accepted by the CSV parser I have closest at hand (Numbers). The RFC specifies that double-quotes should be escaped as two double quotes ""
and single-quotes aren’t escaped at all.
CSV is easy to get wrong in data-dependent ways; I recommend you use the CSV library.