Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 916504 - after world update UnicodeEncodeErrors in install phase for ca-certificates and libxcb
Summary: after world update UnicodeEncodeErrors in install phase for ca-certificates a...
Status: RESOLVED DUPLICATE of bug 913655
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Interface (emerge) (show other bugs)
Hardware: All Linux
: Normal major (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-10-29 20:06 UTC by Enrique Domínguez
Modified: 2023-10-30 01:15 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Enrique Domínguez 2023-10-29 20:06:56 UTC
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
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-10-29 20:14:34 UTC

*** This bug has been marked as a duplicate of bug 913655 ***
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-10-29 20:15:03 UTC
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.
Comment 3 Zac Medico gentoo-dev 2023-10-30 01:15:54 UTC
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