diff --git a/clang-tools-extra/test/clang-tidy/check_clang_tidy.py b/clang-tools-extra/test/clang-tidy/check_clang_tidy.py --- a/clang-tools-extra/test/clang-tidy/check_clang_tidy.py +++ b/clang-tools-extra/test/clang-tidy/check_clang_tidy.py @@ -31,7 +31,7 @@ import re import subprocess import sys - +import locale def write_file(file_name, text): with open(file_name, 'w') as f: @@ -151,6 +151,13 @@ clang_tidy_output + '\n------------------------------------------------------------------') + try: + locale.setlocale('en_US') + except: + try: + locale.setlocale('en_US.uf8') + except: + try: diff_output = subprocess.check_output( ['diff', '-u', original_file_name, temp_file_name],