Terry J. Reedy <[email protected]> added the comment:
I got the 'within iomenu' part a bit wrong. To open a file to edit,
iomenu.IOBinging('IO').open tells filelist to use IO.loadfile. This reads
bytes 'so that we can handle end-of-line convention ourselves'. (I suspect
that this predates 3.x and might not be needed any more.) IO.loadfile calls
IO._decode which looks for a utf-8 BOM, looks for a coding cookie, tries ascii
(not needed in 3.x), tries utf-8, and asks the user for an encoding, using
iomenu.encoding as the initial value in the query box. This box is deprecated
in the sense that for 3.x, a python file should either be utf-8 or have an
encoding cookie.
----------
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue41152>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com