diff --git a/clang/tools/scan-build-py/lib/libscanbuild/report.py b/clang/tools/scan-build-py/lib/libscanbuild/report.py --- a/clang/tools/scan-build-py/lib/libscanbuild/report.py +++ b/clang/tools/scan-build-py/lib/libscanbuild/report.py @@ -417,7 +417,7 @@ 'bug_path_length': 1 } - with open(filename) as handler: + with open(filename, encoding='utf-8') as handler: for line in handler.readlines(): # do not read the file further if endsign.match(line):