[New-bugs-announce] [issue31565] open() doesn't use locale.getpreferredencoding()

Serhiy Storchaka report at bugs.python.org
Sat Sep 23 17:49:37 EDT 2017


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 <report at bugs.python.org>
<https://bugs.python.org/issue31565>
_______________________________________


More information about the New-bugs-announce mailing list