Skip to content

Explain clearly that INVALID_OPENING_QUOTE error can be caused due to BOM character #120

@alexander-kazakov

Description

@alexander-kazakov

We've been stuck with the INVALID_OPENING_QUOTE error for days due to first row of CSV file starting with a quote:
"1800","2000 5","2000","2000 6","2000 4","2000 2","2000 3","2000 1","2500"

Apparently this was because of the BOM character and setting bom:true fixed the issue:
https://csv.js.org/parse/options/bom/

I highly recommend to add a clear explanation in the docs that INVALID_OPENING_QUOTE might be caused by not applying bom:true when files are UTF.

Ideally the library should recognise encoding / BOM character automatically by default (if possible) and enable the bom:true parameter should be handled automatically.

Otherwise this causes unexpected behavior in production when someone gives a file which starts with a quote in the first value.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions