diff --git a/compiler-rt/lib/sanitizer_common/scripts/litlint.py b/compiler-rt/lib/sanitizer_common/scripts/litlint.py --- a/compiler-rt/lib/sanitizer_common/scripts/litlint.py +++ b/compiler-rt/lib/sanitizer_common/scripts/litlint.py @@ -45,7 +45,7 @@ The number of errors detected. """ errs = 0 - with open(p, 'r') as f: + with open(p, 'r', encoding='utf-8') as f: for i, s in enumerate(f.readlines(), start=1): msg, col = LintLine(s) if msg != None: