github-csv-tools icon indicating copy to clipboard operation
github-csv-tools copied to clipboard

fix: strip the UTF8 BOM

Open pgerlach opened this issue 2 years ago • 0 comments

The input file is read as UTF8, and in csv-parse documentation is written "It is recommended to always activate this option when working with UTF-8 files." (https://csv.js.org/parse/options/bom/).

This fixes the case where there is a BOM, in which case the first column was not detected, because it includes the BOM character as the first char of the first column name.

If the file has no BOM, then the option does nothing.

pgerlach avatar Aug 24 '22 10:08 pgerlach