Skip to content

Commit

Permalink
open csv file acording to ISO-8859-1 standards
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesgreen-moj committed Jun 3, 2024
1 parent 91de446 commit f2acfc3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 ' '
Expand Down

0 comments on commit f2acfc3

Please sign in to comment.