Explicitly specify encoding when opening text files in Python code
This commit is contained in:
1 parent
fa4b9065a8
commit
634bd97001
19 files changed
+38
-38
No files matched your search
@@ -37,7 +37,7 @@ for arg in sys.argv[1:]:
|
||||
# TODO: implement support for multiple include directories
|
||||
for arg in sorted(files.keys()):
|
||||
module = files[arg]
|
||||
with open(arg, 'r') as f:
|
||||
with open(arg, 'r', encoding="utf8") as f:
|
||||
for line in f:
|
||||
match = RE.match(line)
|
||||
if match:
|
||||
|
||||
Reference in new issue
Block a user