Skip to content

Conversation

Jolanrensen
Copy link
Collaborator

Fixes #687

The solution is based on https://stackoverflow.com/questions/46296827/java-spring-returning-csv-file-encoded-in-utf-8-with-bom

Passing csv reader through BOMInputStream to catch BOM characters if they exist in the file.

@Jolanrensen Jolanrensen requested a review from koperagen August 21, 2024 11:48
Copy link
Contributor

Generated sources will be updated after merging this PR.
Please inspect the changes in here.

@koperagen
Copy link
Collaborator

Code is different than that in the SO answers, is this ok?

@Jolanrensen
Copy link
Collaborator Author

Code is different than that in the SO answers, is this ok?

Yeah, if I had it like there, it didn't like the .reset() command. But the BOMInputStream changed in the meantime; the old constructor was deprecated, so I assume it now works like this. The test worked in any case :)

@Jolanrensen Jolanrensen merged commit 9870305 into master Aug 22, 2024
4 of 5 checks passed
@Jolanrensen Jolanrensen deleted the csv-with-bom-fix branch August 22, 2024 09:37
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.

Reading CSV with byte order mark bleeds into first Column Name
2 participants