Hi, This patch series, - removes the PYTHON_UTF8 workaround introduced in d4e5ec877ca - adds a different workaround that avoids the locale problem altogether by opening files in binary read/write mode and setting encoding/decoding (in utf-8) explicitly
The problem with setting LC_ALL= LANG=C LC_CTYPE=en_US.UTF-8 is that the en_US.UTF-8 locale might not be available. In this case setting above locales results in build errors even though another UTF-8 locale was originally set [1]. We propose a different approach to fix the locale dependent encode/decode problem in common.py utilizing the binary read/write mode [2,3] and decode/encode with explicit UTF-8 encoding arguments [4]. This approach is preferred over the fix in commit d4e5ec877ca because it is (a) locale independent, and (b) does not depend on the en_US.UTF_8 locale to be available. Best, Matthias and Arfrever [1] https://bugs.gentoo.org/657766 [2] https://docs.python.org/3.6/library/stdtypes.html#bytes.decode [3] https://docs.python.org/3.6/library/stdtypes.html#str.encode [4] https://docs.python.org/3/howto/unicode.html