Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re^2: Text::CSV and escaped quotes

by mldvx4 (Friar)
on Sep 29, 2023 at 00:20 UTC ( [id://11154739] : note . print w/replies, xml ) Need Help??


in reply to Re: Text::CSV and escaped quotes
in thread Text::CSV and escaped quotes

Thanks. Setting both the escape_char and the quote_char does it. I had not realized the necessity of doing that explicitly.

escape_char => '\\', quote_char => "'",

I guess the general (mis-)use of CSV is complicated by the reality that "there is no formal specification in existence, which allows for a wide variety of interpretations of CSV files". ODF was supposed to ameliorate this problem, but 1) the devil is in the details, 2) ODF is more complex, and 3) it got squelched by the usual adversary of open standards.

Replies are listed 'Best First'.
Re^3: Text::CSV and escaped quotes
by NERDVANA (Deacon) on Sep 30, 2023 at 07:30 UTC
    The one I keep running into is where they don't bother escaping anything, and just hope the quotes work out.

    There's a setting for that too!