From 846fd6203d54117be4beb94aa084d72d6be98666 Mon Sep 17 00:00:00 2001 From: Sahil Sanghavi Date: Tue, 14 Jul 2020 22:07:45 +0530 Subject: [PATCH] Add default encoding as UTF-8 --- mailmerge/__main__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mailmerge/__main__.py b/mailmerge/__main__.py index ae30d7c..8492e6c 100644 --- a/mailmerge/__main__.py +++ b/mailmerge/__main__.py @@ -268,7 +268,7 @@ class StrictExcel(csv.excel): # pylint: disable=too-few-public-methods, missing-class-docstring strict = True - with database_path.open("r") as database_file: + with database_path.open(mode="r", encoding="utf-8") as database_file: reader = csv.DictReader(database_file, dialect=StrictExcel) try: for row in reader: