+ Reply to Thread
Results 1 to 2 of 2

Thread: Mostly off-topic: csv with embedded quotes

  1. #1
    Join Date
    Dec 2005
    Posts
    74

    Default Mostly off-topic: csv with embedded quotes

    I've been using FM for some time without problem. Today I got stumped: a form was submitted in which one of the form fields had embedded quotes. The field read, in part, '...to assist "Read Up" adult literacy...' (single quotes mine). I've been using fgetcsv() to parse the csv attachment. The embedded quotes caused field contents to shift; I ended up manually editing the incoming csv file to handle the attachment. The csv contents end up in a database.

    I could use some help coming up with a better method of parsing the contents of the attachment. I've looked at parsecsv.lib.php, a class for parsing csv files but had no luck with it. It didn't seem to do a thing with the incoming file.

    Surely someone out there has a solution to this?

    Thanks.

    george

  2. #2
    Join Date
    Dec 2005
    Posts
    74

    Default Re: Mostly off-topic: csv with embedded quotes

    The solution: upgraded formmail to the latest (from v7.12 conditions!) and use csv filters to escape the embedded quotes. In short, RTFM.

    g
    Last edited by GeoBrooks; 27-Nov-2010 at 06:58 PM. Reason: added previous version

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Similar Threads

  1. double quotes cut off in email
    By buckwestern in forum Community Support
    Replies: 7
    Last Post: 12-Mar-2012, 06:55 PM
  2. CSV file is still encoded when Filter=CSV
    By redheadkelly in forum FormMailEncoder/Decoder
    Replies: 6
    Last Post: 03-Mar-2009, 10:29 PM
  3. Possible solution to stripped quotes
    By brucecu in forum Community Support
    Replies: 0
    Last Post: 03-Mar-2009, 07:17 PM
  4. Double quotes stripped to single quotes
    By DeweyW in forum Community Support
    Replies: 2
    Last Post: 20-Sep-2006, 12:02 PM
  5. "Magic Quotes" problem?
    By SteveK in forum FormMail Subscription Support
    Replies: 6
    Last Post: 20-Nov-2004, 03:22 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts