[issue39154] "utf8" not always a synonym for "utf-8" in lib2to3

Peter Ludemann report at bugs.python.org
Mon Dec 30 02:51:30 EST 2019


Peter Ludemann <peter.ludemann at gmail.com> added the comment:

To clarify and fix a typo ... lib2to3.pgen2.tokenize.detect_encoding checks for 'utf-8'(and 'utf_8') but not 'utf8' in various places. Similarly for 'latin-1' and 'latin1'. (The codecs documentation page allows 'utf8' and 'latin1' as codecs.)

['UTF-8' is taken care of in _get_normal_name] 

See also https://bugs.python.org/issue39155

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue39154>
_______________________________________


More information about the Python-bugs-list mailing list