From f0054336ea89678c30f681fe0a4894b87825f2a3 Mon Sep 17 00:00:00 2001 From: Nahor Date: Sun, 10 May 2026 12:49:11 -0700 Subject: [PATCH] man-pages: force encoding when reading doc sources Force the encoding to not be dependent on the environment locale. In particular on Windows, the encoding could default to an ANSI page code, which would fail to load any file containing bytes 0x80+, i.e any multi-byte UTF-8 character. Closes #12748 --- doc_src/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc_src/conf.py b/doc_src/conf.py index 9b1a139a1..c9150f940 100644 --- a/doc_src/conf.py +++ b/doc_src/conf.py @@ -218,7 +218,7 @@ latex_engine = "xelatex" def get_command_description(path, name): """Return the description for a command, by parsing its synopsis line""" - with open(path) as opened: + with open(path, encoding="utf8") as opened: for line in opened: if line.startswith(name + " - "): _, desc = line.split(" - ", 1)