My locale was en_US.iso88591 for years but after world (python) upgrade I found install errors about UnicodeEncodeError ("UnicodeEncodeError: 'X' codec can't encode characters in position..." with X anything different from utf8) Problem looks like 'write' function defaults to errors='Strict' maybe better with a 'replace' function. Not idea how to do it. BUGs possibly related: 913655, 707026, 403681, 353299. I'm not a python programmer. Maybe useful, https://docs.python.org/3/library/io.html#io.TextIOBase.write Not at hand but could look for previous portage version which did not show this behavior if necessary. Hope its helps. Reproducible: Always
*** This bug has been marked as a duplicate of bug 913655 ***
I think this is just because more software is using stuff with fancier names. ca-certificates had a bug with it recently because it just started installing one. Please use a UTF 8 locale.
You can also use a special environment variable, like export PYTHONUTF8=1 to enable python UTF8 mode (it is proposed to be the default behavior in python 3.15): https://docs.python.org/3/library/os.html#python-utf-8-mode