Escape Character for CSV

klaatu Community Member Posts: 988
What is the escape character for use in CSV files? Some multiple choice questions contain comma separated items. Without using an escape character some of the questions imported correctly while others (seemingly identical) did not.


  • timk
    timk Community Member Posts: 1,205 ♦ Idol ♦
    Citation from the Help:

    If you are using a text-file version of CSV, text that contains a comma must be enclosed within quotes. “For example, this sentence contains a comma.”

    Hope it helps, I've never used CSV files.
  • klaatu
    klaatu Community Member Posts: 988
    Unfortunately, it doesn't. I tried that as well as other stuff from the actual CSV spec. Whats real odd is that some questions with comma separated lists in the answers imported okay without using double quotes at all. I found that trying to use double quotes either included the quotes like they weren't escape characters, the questions partially imported or parts of the questions didn't import at all. It probably would have been a better idea to use pipe delimited CSV files instead of comma's, no?

    I also thought it might be the format of my csv file, or that it might be corrupt so I made a new one and got the same results. I'll post the csv file next week as I do not have it with me (and I wont be typing it out

    Thanks Tim.

  • 8ball
    8ball Community Member Posts: 35
    We commonly get our questions in excel template that we convert to csv and often have special characters like trademarks, apostrophes, and others get imported as a rectangular character.. The solution is to make sure the csv file is using the correct encoding which I think Lectora is using Unicode (UTF 8).

    When you open or save a csv file in excel the encoding might get messed up. (I see some get ANSI, or plain unicode and not UTF-8)

    The easiest way to fix this before importing into Lectora is by doing this:
    1. Open your question file CSV using Notepad.
    2. Click: File>Save As, below the file name expand the list of Encoding field and select UTF-8.
    3. Save the file and import it into Lectora
  • klaatu
    klaatu Community Member Posts: 988
    Thank you, Justin. I'll make sure to check that.
  • karneson7637
    karneson7637 Community Member Posts: 1
    We're experiencing the same issue. Many of our answer options have commas and they are not being imported correctly. The odd thing is that some import and some do not and we are not able to find a pattern for why this occurs. We have tried to use the quotations as escape characters and have made sure the file is UTF-8, but we still are not having any luck.