Skip to content
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

fix(dsv): strip bom from csv/tsv files if necessary #1745

Merged
merged 4 commits into from
Sep 23, 2024

Conversation

CrazyOrr
Copy link
Contributor

@CrazyOrr CrazyOrr commented Jul 1, 2024

Rollup Plugin Name: dsv

This PR contains:

  • bugfix
  • feature
  • refactor
  • documentation
  • other

Are tests included?

  • yes (bugfixes and features will not be merged without tests)
  • no

Breaking Changes?

  • yes (breaking changes will not be merged unless absolutely necessary)
  • no

If yes, then include "BREAKING CHANGES:" in the first commit message body, followed by a description of what is breaking.

List any relevant issue numbers:

Description

Excel saves UTF-8 CSV files with a BOM. When such files are parsed, the key corresponding to the first column has 0xFEFF as its first character, which leads to keyName became "keyName" (double-quoted).

As this reply suggest, we should use strip-bom to remove the BOM if necessary.

@CrazyOrr CrazyOrr requested a review from shellscape as a code owner July 1, 2024 12:45
Copy link
Collaborator

@shellscape shellscape left a comment

Choose a reason for hiding this comment

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

@CrazyOrr looks like there's a conflict with pnpm-lock.yaml after a recent merge. please run pnpm i in the repo root directory and we'll be good to merge pending tests running in CI.

@CrazyOrr
Copy link
Contributor Author

Done.

@shellscape shellscape merged commit 8c24fb6 into rollup:master Sep 23, 2024
4 of 5 checks passed
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