Repair unescaped quotes in CSV
Keep literal quotation marks inside fields so a CSV reader can import the table.
Keep quotation marks inside CSV fields
A field with a comma is often enclosed in double quotes. If the field itself contains a quote, CSV represents it with two adjacent double quotes so the reader can tell it apart from the end of the field.
A quote before a separator can be ambiguous. An interior quote followed by a separator can look like the end of the field. Check the intended field boundaries in the source system when the result reports an inconsistent column count.