Skip to content

Strip BOM character from column keys when parsing header, add BOM tests #1090

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

Merged
merged 2 commits into from
May 30, 2025

Conversation

baumschubser
Copy link
Contributor

Addresses #372, stripping BOM from column keys when parsing the header.
The problem: The first column key includes the invisible BOM character if it exists in the CSV.

Pull request #961 handled BOM stripping for parsing the CSV without keyed data. However, with header: true the issue still persisted. This is solved by this pull request that runs the stripBom function from #961 also on the header field, before 'transformHeader'.

Also, I added tests for BOM handling.

Copy link
Collaborator

@pokoli pokoli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi,

Thanks for your proposal. There are some minors fixes that should be addressed before merging your changes. Would you mind fixing them by amending the changes to current commit?

@baumschubser
Copy link
Contributor Author

Oops, sorry for that. I removed the obsolete test and the console.log

@pokoli pokoli merged commit 08265f1 into mholt:master May 30, 2025
3 checks passed
@pokoli
Copy link
Collaborator

pokoli commented May 30, 2025

I merged the changes, thanks for contributing in the project!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants