Skip to content

Commit b4b7eb9

Browse files
committed
Set encoding to please Windows
1 parent c3faf1f commit b4b7eb9

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

bin/countries.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
countries = {}
77
p_data = Path('datasets')
88

9-
reader = csv.reader(p_data.joinpath('countryInfo.txt').open(), 'excel-tab')
9+
reader = csv.reader(p_data.joinpath('countryInfo.txt').open(encoding='utf-8'), 'excel-tab')
1010
for record in reader:
1111
if record[0].startswith('#'):
1212
continue

bin/us_counties.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
p_data = Path('datasets')
77

8-
reader = csv.reader(p_data.joinpath('national_county2020.txt').open())
8+
reader = csv.reader(p_data.joinpath('national_county2020.txt').open(encoding='utf-8'))
99
next(reader) # skip header row
1010

1111
state_name_idx = 0

0 commit comments

Comments
 (0)