We've Moved! Please visit our new and improved forum over at our new portal: https://portal.plumvoice.com/hc/en-us/community/topics

Double quotes in CSV

Questions and answers about Plum Survey

Moderators: admin, support

Post Reply
avirani
Posts: 4
Joined: Mon Aug 31, 2009 9:16 am

Double quotes in CSV

Post by avirani »

I have a question in my Survey:

How aware do you consider yourself regarding women's fashion, from "very aware" to "not at all aware"?

When I download the CSV, the above text appears with two quotes instead of one:

How aware do you consider yourself regarding women's fashion, from ""very aware"" to ""not at all aware""?

This is throwing off my parsing because the string from CSV (used as the header) does not match the master survey file which stores the question as originally posted.
Why is this happening?

support
Posts: 3632
Joined: Mon Jun 02, 2003 3:47 pm
Location: Boston, MA
Contact:

common practice for CSV values in IVR survey

Post by support »

Hi Avirani,

This is common practice for CSV values with embedded quotation marks. For more information, check Wikipedia, notably the following rule:
Fields with embedded double-quote characters must be enclosed within double-quote characters, and each of the embedded double-quote characters must be represented by a pair of double-quote characters.
If embedded quotation marks were not doubled, there would be a parsing ambiguity between an embedded quotation mark and a quotation mark signifying the end of a quoted string value.

You will have to use your parser to convert doubled quotation marks to single quotation marks. Most software, such as Microsoft Excel, or the fgetcsv PHP function, does this automatically.

Hope this helps with your IVR survey,
Plum Support.

Post Reply