Double quotes in CSV

Questions and answers about Plum Survey

Moderators: support, admin

Double quotes in CSV

Postby avirani » Tue Nov 10, 2009 6:19 pm

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?
avirani
 
Posts: 4
Joined: Mon Aug 31, 2009 10:16 am

common practice for CSV values in IVR survey

Postby support » Tue Nov 10, 2009 6:40 pm

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.
Plum Voice IVR Solutions
IVR Hosting, Systems and Professional Services
Visit: http://www.plumvoice.com
support
 
Posts: 2178
Joined: Mon Jun 02, 2003 4:47 pm
Location: Boston, MA


Return to Plum Survey Q&A

Who is online

Users browsing this forum: No registered users and 1 guest