Explore the community Forums Lectora Lectora Questions & Answers Escape Character for CSV

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #342847 Score: 0
    Profile photo of Darrel Somoza
    Darrel Somoza
    Member
    contributor
    friend finder
    beginner
    intermediate
    junior moderator
    advanced
    wise owl
    curious george
    129 pts
    @Klaatu

    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.

    #342909 Score: 0
    Profile photo of Tim K
    Tim K
    Member
    contributor
    beginner
    intermediate
    advanced
    friend finder
    junior moderator
    advocate
    wise owl
    curious george
    Group Member
    178 pts
    @timk

    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.

    #342913 Score: 0
    Profile photo of Darrel Somoza
    Darrel Somoza
    Member
    contributor
    friend finder
    beginner
    intermediate
    junior moderator
    advanced
    wise owl
    curious george
    129 pts
    @Klaatu

    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 again..lol).

    Thanks Tim.

     

    #343487 Score: 0
    Profile photo of Justin Ball
    Justin Ball
    Member
    beginner
    intermediate
    friend finder
    entry
    wise owl
    contributor
    entry
    advanced
    3 pts
    @8ball

    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
    Attachments:
    #343490 Score: 0
    Profile photo of Darrel Somoza
    Darrel Somoza
    Member
    contributor
    friend finder
    beginner
    intermediate
    junior moderator
    advanced
    wise owl
    curious george
    129 pts
    @Klaatu

    Thank you, Justin. I’ll make sure to check that.

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.