socket.getfqdn() UnicodeDecodeError depending on LANG variable #93251
Labels
3.9
only security fixes
3.10
only security fixes
topic-unicode
type-bug
An unexpected behavior, bug, or error
Bug report
This code:
Raise an exception if running it like this:
Note the LANG. I haven't checked for which "LANG" this works or fails.
/etc/hosts
, not resolvable via DNS or other methods up to/etc/nsswitch.conf
hosts settings). The hostname, to reproduce the problem, can be changed on Linux viasudo hostname something-that-does-not-exist
.Your environment
Tested this on a Debian 11 bullseye with the the following Python interpreters:
I've encountered this bug in two independent Debian installations (with different locale settings) and in a CI system (also Debian based but unrelated settings).
Only tested in x64 systems.
The text was updated successfully, but these errors were encountered: