Skip to content

Add UTF-8 byte order mark to CSV and TSV downloads so that files will be parsed by Excel correctly.#1043

Open
craiga wants to merge 1 commit into
jieter:masterfrom
craiga:byte-order-mark-for-csv
Open

Add UTF-8 byte order mark to CSV and TSV downloads so that files will be parsed by Excel correctly.#1043
craiga wants to merge 1 commit into
jieter:masterfrom
craiga:byte-order-mark-for-csv

Conversation

@craiga

@craiga craiga commented Jun 30, 2026

Copy link
Copy Markdown

An attempt to fix #1041.

Note that this requires some pretty liberal conversion from utf8 to utf-8-sig to consume these byte order markers.

While this would make life easier for Excel users, it might frustrate people using other software, especially anyone using a CSV in their own code (example).

Given all of this, I'm not 100% convinced what I've done here is the right approach. Perhaps adding another format for CSV with a BOM would be better ("csv-excel"? "csv-with-bom"?), but explaining the differences between those formats wouldn't be easy.

@craiga craiga force-pushed the byte-order-mark-for-csv branch from 4370842 to efb3f31 Compare June 30, 2026 11:44
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.

Add byte-order mark to CSV exports so that Excel knows they're UTF-8 encoded?

1 participant