On Tue, Feb 9, 2021 at 5:51 PM Anders Munch <a...@flonidan.dk> wrote: > Victor Stinner [mailto:vstin...@python.org] wrote: > > The warning can explicitly suggest to use encoding="utf8", it should work > > in almost all cases. > > The warning should also explain how to get backwards-compatible behaviour, > i.e. suggest encoding="locale".
encoding="utf8" is backward compatible and is likely to fix encoding bugs when the locale encoding is not UTF-8. It is likely what the developer expected, without knowing that open(filename) does not always use UTF-8. See PEP 597 rationale. Victor -- Night gathers, and now my watch begins. It shall not end until my death. _______________________________________________ Python-Dev mailing list -- python-dev@python.org To unsubscribe send an email to python-dev-le...@python.org https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archived at https://mail.python.org/archives/list/python-dev@python.org/message/L2H34EXNE7XUQX3XILLPDNGOQHVK6ENR/ Code of Conduct: http://python.org/psf/codeofconduct/