From c7fe7b09a5aab962532033818cbd38ed4ce07589 Mon Sep 17 00:00:00 2001 From: Andrew Kaster Date: Wed, 5 Feb 2025 17:32:10 -0700 Subject: [PATCH] Meta: Open files with explicit encoding in check-style.py --- Meta/check-style.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Meta/check-style.py b/Meta/check-style.py index ba08b56bf8b..4409edbf94a 100755 --- a/Meta/check-style.py +++ b/Meta/check-style.py @@ -99,7 +99,7 @@ def run(): errors_single_page_html_spec = [] for filename in find_files_here_or_argv(): - with open(filename, "r") as f: + with open(filename, mode="r", encoding='utf-8') as f: file_content = f.read() if not is_in_prefix_list(filename, LICENSE_HEADER_CHECK_EXCLUDES): if not GOOD_LICENSE_HEADER_PATTERN.search(file_content):