Menu

New Lines in CSV Starting with " which is straight double quotes will not parse that particular line

Anonymous
2022-07-17
2022-07-17
  • Anonymous

    Anonymous - 2022-07-17

    First, sir, thank you for this wonderful program and your hard work, and I do not want to cause you any inconvenience.
    I simply think I do not know how to do something which to you may be obvious.
    The filed break is the vertical bar.
    It asks me what I want quotes to be. I read your 2013 post announcing to a user that you added this feature.
    My cvs uses " within several records in one or more fields.
    Shouldn't I set this to " then too?
    I assumed I should do so, and I have, and now I have this problem of lines of text not being parsed at all

     
  • Bruce Martin

    Bruce Martin - 2022-07-17

    Quotes in a CSV refers to having a Quote at the start and end of a field.
    e.g.

    111|"Field 2"|333
    444|"Field with ""|"" a bar"|666
    

    in the above case you would specify a quote of ".

    In the example below you would not specify a quote

    111|Field 2|333
    444|Field with a "quote"|666

    CSV means Comma separated values. Problems arise if you use a comma in a field

    e.g.

    field 1,Comma, in a field,field 3

    in the above example, field2="Comma, in a field" but the
    line would be passed as

    field1 = "field 1"
    field2 = "Comma"
    field3 = " in a field"
    field4 = "field 3"

    to get around this problem, quoted fields where introduced. The above example
    would be represented as

    field 1,"Comma, in a field",field 3
    

    with " used in the second field.

    Generally with | separated fields there is no quote. If you have any issues
    show me an example of the file

     

Anonymous
Anonymous

Add attachments
Cancel