Repository navigation
fix(import): accept CSV files saved with a UTF-8 BOM - #877
Merged
evilguy4000 merged 1 commit intoNov 15, 2026
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Saving the CSV import template from Excel as "CSV UTF-8" (the option needed for non-ASCII client or project names) adds a UTF-8 byte order mark. The import routes decode the upload with
utf-8, which keeps the BOM, socsv.DictReaderreads the first header asproject_nameand every row fails:The client import (
/api/import/csv/clients) has the same problem with itsnamecolumn. Both now decode withutf-8-sig, as the bank statement import already does (bank_reconciliation.py). Files without a BOM decode the same as before.Added
tests/test_import_csv_bom.pywith one BOM upload per route; both fail without the change. (tests/test_import_export.pyis skipped as a whole, so the tests are in a new file.) The import, export and client test files pass, with no failures besides those two before the change.