From aad6f77b647edba28f9e192346076d2922841a0d Mon Sep 17 00:00:00 2001 From: Fujii Hironori Date: Sun, 30 Apr 2023 13:20:49 -0700 Subject: [PATCH] process-css-properties.py fails for some host locales when trying to decode JSON as GBK https://bugs.webkit.org/show_bug.cgi?id=256036 Reviewed by Darin Adler and Alexey Proskuryakov. * Source/WebCore/css/process-css-properties.py: Open "CSSProperties.json" as UTF-8. Canonical link: https://commits.webkit.org/263543@main --- Source/WebCore/css/process-css-properties.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/WebCore/css/process-css-properties.py b/Source/WebCore/css/process-css-properties.py index 3a9722896e7f..52b20cb75e8b 100755 --- a/Source/WebCore/css/process-css-properties.py +++ b/Source/WebCore/css/process-css-properties.py @@ -6105,7 +6105,7 @@ def main(): parser.add_argument('--check-unused-grammars-values', action='store_true') args = parser.parse_args() - with open(args.properties, "r") as properties_file: + with open(args.properties, "r", encoding="utf-8") as properties_file: properties_json = json.load(properties_file) parsing_context = ParsingContext(properties_json, defines_string=args.defines, parsing_for_codegen=True, check_unused_grammars_values=args.check_unused_grammars_values, verbose=args.verbose)