On Sun, Dec 11, 2016 at 3:24 AM, Thomas Spura <tomspur(a)fedoraproject.org> wrote:
To change the default encoding for python was proposed a while ago [1], but
was finally dropped again, as upstream didn't agree to this change. Did
anything changed here from upstream python?
Best,
Thomas
[1]
https://fedoraproject.org/wiki/Features/PythonEncodingUsesSystemLocale
The Feature to change the encoding in Python2 was problematic because
of its implementation. It lead to some pretty nasty problems such as
breaking dictionaries. See my blog post about that:
https://anonbadger.wordpress.com/2015/06/16/why-sys-setdefaultencoding-wi...
So the difference here is that the proposal is to change the locale.
That won't mess with the low-level handling of data structures that
messing with sys.setdefaultencoding would.
One of the things that makes changing the locale easier is that Fedora
now supports a C.UTF8 locale. So Fedora now ships with a UTF8 capable
fallback. If we'd tried to implement this precise change before the
nearest equivalent of a universal utf8-capable locale would have been
something like en_US.UTF8 which a significant minority would not have
found as universal as we would have liked.
-Toshio