On Tue, Feb 9, 2021 at 5:51 PM Anders Munch <[email protected]> wrote:
> Victor Stinner [mailto:[email protected]] 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 -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/[email protected]/message/L2H34EXNE7XUQX3XILLPDNGOQHVK6ENR/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to