You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
getfilesystemencoding() returns incorrect value on Linux #2664
However, this is not correct! First, it only prints this on Linux. On windows, the filesystem-encoding is correctly determined to be 'utf-8'. Running a simple oneliner in python itself returns the correct values on both platforms:
Properly doing this during startup requires implementing the PyPreConfig mechanism, see https://docs.python.org/3.14/c-api/init_config.html#c.PyPreConfig.utf8_mode. It has been available in all versions that we support, so it should not be a huge effort to implement it. Contributions are welcome. PySys_AddXOption does not make sense to add, as it has been deprecated in 3.11.
Have you tried setting the environment variables from outside of your process?
Activity
filmor commentedon Dec 6, 2025
This is not a bug, it is a missing feature.
Properly doing this during startup requires implementing the
PyPreConfigmechanism, see https://docs.python.org/3.14/c-api/init_config.html#c.PyPreConfig.utf8_mode. It has been available in all versions that we support, so it should not be a huge effort to implement it. Contributions are welcome.PySys_AddXOptiondoes not make sense to add, as it has been deprecated in 3.11.Have you tried setting the environment variables from outside of your process?
iFreilicht commentedon Dec 10, 2025
Ahh, that's interesting! Yes, I have, and I've found a constellation that works in my containers as expected.