From b3bc81ff26793c00342040f70d8aa9c8c37e9e58 Mon Sep 17 00:00:00 2001 From: Fineen Davis Date: Tue, 16 Mar 2021 12:19:42 -0400 Subject: [PATCH] utf8 fixes --- DataBuilder/src/csv_to_dict.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/DataBuilder/src/csv_to_dict.py b/DataBuilder/src/csv_to_dict.py index 02e4ff3..e12097c 100644 --- a/DataBuilder/src/csv_to_dict.py +++ b/DataBuilder/src/csv_to_dict.py @@ -56,7 +56,7 @@ def columnTitles(self): Grabs the column/category titles. """ - with codecs.open(self.input_file, encoding='latin1') as f: + with codecs.open(self.input_file, encoding='utf-8') as f: reader = csv.reader(f) self.headers = next(reader) @@ -68,7 +68,7 @@ def toDict(self): Output File (str): Name of file where dictionary list is written. List of Dictionaries (list): List of converted dictionaries (with no duplicates) """ - with codecs.open(self.input_file, encoding='latin1') as csvfile: + with codecs.open(self.input_file, encoding='utf-8') as csvfile: # with open(self.input_file, 'r') as csvfile: scrape_dict = csv.DictReader(csvfile) self.list_of_dicts = [x for x in scrape_dict]