-
Notifications
You must be signed in to change notification settings - Fork 214
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
utf-8 bom causes first column value to be corrupted #131
Comments
I am observing this in version 2.3.0. In my case the first column should be 'Type', but it is coming out as '<U+FEFF>Type'. We should probably add some code to handle all the common scenarios, as described here: |
I've used the strip-bom-stream module for now to handle this. fs.createReadStream(fileName)
.pipe( stripBomStream() )
.pipe( csv(options) ) |
Should this fix be added to the repo or should we always use stripBomStream? |
2.3.1 is published with the fix. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
UTF8 files starting with BOM cause parsed csv data to be broken for the first value.
If the first row contains column names,
then the first column becomes unusable to lookup by name.
Either a code change to strip a possible BOM as the first character or a documentation update would be helpful.
The text was updated successfully, but these errors were encountered: