DAGDA SEARCH | Back to results | Support

Issue 31565: open() doesn't use locale.getpreferredencoding() - Python tracker

Source: https://bugs.python.org/issue31565

homepage

Issue31565 ➜

This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Created on 2017-09-23 21:49 by serhiy.storchaka, last changed 2022-04-11 14:58 by admin.

Messages (1)
msg302812 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2017-09-23 21:49
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().
History
Date User Action Args
2022-04-11 14:58:52adminsetgithub: 75746
2017-09-23 22:54:56vstinnersetnosy: + vstinner
2017-09-23 21:49:37serhiy.storchakacreate
Supported by The Python Software Foundation,
Powered by Roundup Copyright © 1990-2022, Python Software Foundation
Legal Statements