Explicitly specify encoding when opening text files in Python code

This commit is contained in:
practicalswift
2018-06-12 17:49:20 +02:00
parent fa4b9065a8
commit 634bd97001
19 changed files with 38 additions and 38 deletions

View File

@ -9,7 +9,7 @@ import subprocess
import unittest
def write_testcode(filename):
with open(filename, 'w') as f:
with open(filename, 'w', encoding="utf8") as f:
f.write('''
#include <stdio.h>
int main()