diff --git a/cpp2python.py b/cpp2python.py index d0e13f1..c98e98c 100755 --- a/cpp2python.py +++ b/cpp2python.py @@ -285,9 +285,9 @@ def process_file(in_filename, out_filename): """ generator - outputs processed file """ - with open(in_filename, 'r') as file: + with open(in_filename, 'r', encoding='utf-8') as file: lines = file.readlines() # probably would die on sources more than 100 000 lines :D - with open(out_filename, 'w+') as file: + with open(out_filename, 'w+', encoding='utf-8') as file: for line in lines: file.write(process_line(line))