Re: [PATCH] docs: conf.py: fix the 'utf-8' typo

From: Randy Dunlap

Date: Fri Aug 14 2026 - 18:55:04 EST




On 8/11/26 9:46 AM, Jonathan Corbet wrote:
> Randy Dunlap <rdunlap@xxxxxxxxxxxxx> writes:
>
>> "encoding" should be 'utf-8'. Fix the typo.
>>
>> Fixes: 7ea9a550f710 ("docs: conf.py: several coding style fixes")
>> Signed-off-by: Randy Dunlap <rdunlap@xxxxxxxxxxxxx>
>> ---
>> Cc: Jonathan Corbet <corbet@xxxxxxx>
>> Cc: Shuah Khan <skhan@xxxxxxxxxxxxxxxxxxx>
>> Cc: Mauro Carvalho Chehab <mchehab@xxxxxxxxxx>
>>
>> Documentation/conf.py | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> --- linux-next-20260805.orig/Documentation/conf.py
>> +++ linux-next-20260805/Documentation/conf.py
>> @@ -287,7 +287,7 @@ author = "The kernel development communi
>> try:
>> makefile_version = None
>> makefile_patchlevel = None
>> - with open("../Makefile", encoding="utf=8") as fp:
>> + with open("../Makefile", encoding="utf-8") as fp:
>> for line in fp:
>
> So this is somewhat weird... open() will throw an exception with an
> unknown encoding, but takes "utf=8" without complaint. Somehow they are
> explicitly handling that case. So the code is arguably correct :)

It's not listed as a valid alias anywhere that I can find.

But then using "utf8" is only a valid alias when using cpython codecs AFAICT:

kdoc_parser.py:1690: with open(self.fname, "r", encoding="utf8",
kdoc_parser.py:1731: with open(self.fname, "r", encoding="utf8",

> That said, I've applied the patch, thanks.


--
~Randy