Browse Source

specify utf-8 opening the input file

xry111 4 years ago
parent
commit
f844459625
1 changed files with 1 additions and 1 deletions
  1. 1 1
      csv_parser.py

+ 1 - 1
csv_parser.py

@@ -43,7 +43,7 @@ def data_from_row(d):
 
 def parse_data_from_csv(f):
     if type(f) == str:
-        with open(f) as fd:
+        with open(f, encoding='utf-8') as fd:
             return parse_data_from_csv(fd)
     from csv import DictReader
     rd = DictReader(f)