Skip to content

readcsv does not correctly handle multi-line records in CSV files #5082

Open

Description

@ShreyasKhandekar

Describe the bug
readcsv does not correctly handle multi-line records in CSV files. CSV explicitly allows line breaks inside quoted fields. When a field begins with a quote and contains a newline before the closing quote, that newline is part of the field value—not a record terminator.

RFC reference: https://www.ietf.org/rfc/rfc4180.txt (Section 2, rule 6)

To Reproduce
Same steps as #3945
An example of valid csv with multi line record is:

"id","comment","value"
1,"Hello
World",42
2,"Another
multi-line
comment",13
3,"No newline",7

Additional context
Same challenges as #3945

Activity

  1. added
    bug
    File IO
    on Nov 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

File IObug

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions