From 46f05cfb9793a77c98742ce9048a06e07c20bd11 Mon Sep 17 00:00:00 2001 From: Scot Hacker Date: Sun, 10 Mar 2019 13:30:35 -0700 Subject: [PATCH] Handle BOM marks --- todo/operations/csv_importer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/todo/operations/csv_importer.py b/todo/operations/csv_importer.py index ca2493c..afef474 100644 --- a/todo/operations/csv_importer.py +++ b/todo/operations/csv_importer.py @@ -30,7 +30,7 @@ class CSVImporter: print(f"Sorry, couldn't find file: {filepath}") sys.exit(1) - with open(filepath, mode="r") as csv_file: + with open(filepath, mode="r", encoding="utf-8-sig") as csv_file: # Have arg and good file path -- read in rows as dicts. # Header row is: # Title, Group, Task List, Created Date, Due Date, Completed, Created By, Assigned To, Note, Priority