Skip to content

Commit 30c6937

Browse files
committed
Don't use "rt" mode because 2.7 on Windows.
1 parent 67f2ef6 commit 30c6937

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

src/hyperlink/hypothesis.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,11 @@ def idna_characters():
6363
dataFileName = join(
6464
dirname(__file__), "idna-tables-properties.csv.gz"
6565
)
66-
with open_gzip(dataFileName, "rt") as dataFile:
67-
reader = csv_reader(dataFile, delimiter=",")
66+
with open_gzip(dataFileName) as dataFile:
67+
reader = csv_reader(
68+
(line.decode("utf-8") for line in dataFile),
69+
delimiter=",",
70+
)
6871
next(reader) # Skip header row
6972
for row in reader:
7073
codes, prop, description = row

0 commit comments

Comments
 (0)