Menu

#193 RFC4180Parser is broken when a multi-line quoted field contains line ends with quote

v1.0 (example)
closed-fixed
None
5
2019-02-10
2019-01-12
Edward Xia
No

When a multi-line quoted field contains a line (but not the last line) which ends with dquote escaped dquote, it terminates the field unexpectedly.

Fisrt, this works as expected:

a,"b""x
c",d

It get you 1 record with 3 fields, 1st field is a, 3rd field is d, and 2nd field (multi-line) is:

b"x
c

However, with a little change to the csv (removing that extra x), it will be broken:

a,"b""
c",d

It becomes 2 record, each with 2 fields:

First record is a, b". Second record is c",b. In this case it's broken.

Discussion

  • Scott Conway

    Scott Conway - 2019-01-13
    • assigned_to: Scott Conway
     
  • Scott Conway

    Scott Conway - 2019-01-13

    At first I was going to say we fixed this but looking through the history it was a different issue (bug 165). I was able to recreate this with a simple unit test and will look at fixing this for the next release.

     
  • Scott Conway

    Scott Conway - 2019-01-14

    Okay - I have found a solution that causes the test to pass, and more importantly not cause the existing tests to fail.

    I have merged it in trunk and it will go out in the next release.

     
  • Scott Conway

    Scott Conway - 2019-01-14
    • status: open --> pending
     
  • Jonathan Kulzick

    Thanks for the fix Scott. I just ran into this issue as well. Do you know roughly when the next release is planned or is there a patch or something I can apply in the meantime?

     
  • Scott Conway

    Scott Conway - 2019-02-07

    Sorry no patches. Short term you can clone the project and build the jar file yourself.

    I was going to do a release last weekend but I caught a cold. I am hoping for this weekend if life works out.

    Scott :)

     
  • Jonathan Kulzick

    Haha. Thanks Scott!

     
  • Scott Conway

    Scott Conway - 2019-02-10

    Fix has been released please download version 4.5 and test it out.

     
  • Jonathan Kulzick

    Thanks again! I've verified the fix works for me.

     
  • Scott Conway

    Scott Conway - 2019-02-10
    • status: pending --> closed-fixed
     
  • Scott Conway

    Scott Conway - 2019-02-10

    Thanks for the quick verification.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.