diff --git a/smatch.py b/smatch.py index 7b31088..5bd4c7b 100755 --- a/smatch.py +++ b/smatch.py @@ -877,7 +877,7 @@ def main(arguments): if not os.path.exists(file_path): print("Given file", args.f[0], "does not exist", file=ERROR_LOG) exit(1) - file_handle.append(open(file_path)) + file_handle.append(open(file_path, encoding='utf8)) # use opened files args.f = tuple(file_handle) # use argparse if python version is 2.7 or later