New submission from Serhiy Storchaka: It is documented that the default encoding for open() and io.TextIOWrapper() is locale.getpreferredencoding(). But actually the C implementation in Python 3 uses _bootlocale.getpreferredencoding(). Monkey-patching locale.getpreferredencoding doesn't affect open().
---------- components: IO messages: 302812 nosy: benjamin.peterson, brett.cannon, eric.snow, ncoghlan, serhiy.storchaka, stutzbach priority: normal severity: normal status: open title: open() doesn't use locale.getpreferredencoding() type: behavior versions: Python 3.6, Python 3.7 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue31565> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com