Skip to content

Commit 11e039b

Browse files
authored
fix open file encode error
fix read utf-8 file in windows10 read to gbk encode.
1 parent 73ac811 commit 11e039b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

cpp2python.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ def process_file(in_filename, out_filename):
285285
"""
286286
generator - outputs processed file
287287
"""
288-
with open(in_filename, 'r') as file:
288+
with open(in_filename, 'r', encoding='utf-8') as file:
289289
lines = file.readlines() # probably would die on sources more than 100 000 lines :D
290290
with open(out_filename, 'w+') as file:
291291
for line in lines:

0 commit comments

Comments
 (0)