[clang] [clang] Enforce UTF-8 in `make_cxx_dr_status` (PR #131816)
Vlad Serebrennikov via cfe-commits
cfe-commits at lists.llvm.org
Tue Mar 18 08:04:58 PDT 2025
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/131816
Otherwise Windows users have troubles with lexer tests that use emojis.
>From e7b2dc54e409f43df1f1e0bf17ec2f06ce61be42 Mon Sep 17 00:00:00 2001
From: Vlad Serebrennikov <serebrennikov.vladislav at gmail.com>
Date: Tue, 18 Mar 2025 18:04:04 +0300
Subject: [PATCH] [clang] Enforce UTF-8 in `make_cxx_dr_status`
Otherwise Windows users have troubles with lexer tests that use emojis.
---
clang/www/make_cxx_dr_status | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/clang/www/make_cxx_dr_status b/clang/www/make_cxx_dr_status
index 05de96119fc18..c787bbaff0a36 100755
--- a/clang/www/make_cxx_dr_status
+++ b/clang/www/make_cxx_dr_status
@@ -39,7 +39,7 @@ def collect_tests():
continue
test_cpp = os.path.join(dr_test_dir, test_cpp)
found_any = False;
- for match in re.finditer(status_re, open(test_cpp, 'r').read()):
+ for match in re.finditer(status_re, open(test_cpp, 'r', encoding="utf-8").read()):
dr_number = int(match.group(1))
if dr_number in status_map:
print("error: Comment for cwg{} encountered more than once. Duplicate found in {}".format(dr_number, test_cpp))
More information about the cfe-commits
mailing list