From f2acfc35897241b7cd6d57312ad9a3bfae771eb8 Mon Sep 17 00:00:00 2001 From: James Green Date: Mon, 3 Jun 2024 14:54:48 +0100 Subject: [PATCH] open csv file acording to ISO-8859-1 standards --- src/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.py b/src/main.py index 6e1bf22..e739dda 100644 --- a/src/main.py +++ b/src/main.py @@ -7,7 +7,7 @@ # Convert CSV file to JSON object. def convert_csv_to_json(file_path): csv_rows = [] - with open(file_path) as csvfile: + with open(file_path, encoding="ISO-8859-1") as csvfile: reader = csv.DictReader(csvfile, skipinitialspace=True, quotechar='"') # Here we clean any Non-breaking spaces and convert to normal spacing. \xa0 converts to ' '