Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#57 Error when there's a backlash at the end of a field.

closed-rejected
Scott Conway
None
5
2010-12-25
2010-11-22
Jose Siqueira
No

There's a problem handling csv fields like:
"blah\"
The Parser gets lost and doesn't break down all the tokens on the line.

I have fixed the problem and wrote a unit test for it.
Please let me know how to send you the patch.

Thanks

Jose'

Discussion

  • Scott Conway
    Scott Conway
    2010-12-25

    • assigned_to: nobody --> sconway
    • status: open --> closed-rejected
     
  • Scott Conway
    Scott Conway
    2010-12-25

    The problem here is that the backslash is the default escape character so
    what is happening is that when the string is read the csv reader believes
    you are escaping the quote character.

    What you need to do is either double escape (or in the unit test quadruple
    backslash) or use a different escape character when initializing the
    CSVReader and CSVWriter.

    :)