diff --git a/clang/docs/tools/dump_format_style.py b/clang/docs/tools/dump_format_style.py index 75d4a044ef19f..e41891f07de2e 100755 --- a/clang/docs/tools/dump_format_style.py +++ b/clang/docs/tools/dump_format_style.py @@ -474,7 +474,7 @@ class State: opts = sorted(opts, key=lambda x: x.name) options_text = "\n\n".join(map(str, opts)) -with open(DOC_FILE) as f: +with open(DOC_FILE, encoding="utf-8") as f: contents = f.read() contents = substitute(contents, "FORMAT_STYLE_OPTIONS", options_text)