From f18248b721ea1f137400899fa2eba025d5546519 Mon Sep 17 00:00:00 2001 From: Dirk van der Laarse Date: Tue, 24 Feb 2026 12:08:47 +0000 Subject: [PATCH 1/2] fix: handle UTF-8 BOM character in Bank Zero csv files --- csf_za/overrides/accounts/bank_statement_import.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/csf_za/overrides/accounts/bank_statement_import.py b/csf_za/overrides/accounts/bank_statement_import.py index de71be7..93b51a9 100644 --- a/csf_za/overrides/accounts/bank_statement_import.py +++ b/csf_za/overrides/accounts/bank_statement_import.py @@ -159,6 +159,10 @@ def parse_csv_file_bankzero(self, file_doc): "Balance", "Has Attachments", ] + # remove UTF-8 BOM from first header cell if present + if data and data[0] and isinstance(data[0][0], str): + data[0][0] = data[0][0].lstrip("\ufeff") + if data[0][:9] != expected_headers[:9]: frappe.throw( _("Unexpected headers in CSV. Expected: {0} in first row").format( From 44f489bd275e4cf620f8322576e19e50f47a24ff Mon Sep 17 00:00:00 2001 From: Dirk van der Laarse Date: Tue, 24 Feb 2026 12:09:07 +0000 Subject: [PATCH 2/2] chore: bump to v0.3.1 --- csf_za/__init__.py | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/csf_za/__init__.py b/csf_za/__init__.py index 493f741..260c070 100644 --- a/csf_za/__init__.py +++ b/csf_za/__init__.py @@ -1 +1 @@ -__version__ = "0.3.0" +__version__ = "0.3.1" diff --git a/package.json b/package.json index 319a040..0ebc526 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "csf_za", - "version": "0.3.0", + "version": "0.3.1", "author": "Starktail (Pty) Ltd ", "main": "index.js", "devDependencies": {