Peter Ludemann <peter.ludem...@gmail.com> added the comment:

lib2to3.tokenize should allow 'utf8' and 'utf-8' interchangeably, to be 
consistent with the rest of the Python library (I looked through the library 
source, and there seems to be no consistent preference, and also many (but not 
all) checks for 'utf-8' also check for 'utf8'). In particular, 
tokenize.detect_encoding should have code for both forms, as the encoding can 
be set by the user. Also, code should allow for 'UTF8' and 'UTF-8'.

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

(This is probably a larger issue than just lib2to3, as a quick grep through 
/usr/lib/python3.7 showed; but not sure how to best address that.)

----------
components: +2to3 (2.x to 3.x conversion tool) -Unicode
title: "utf8-sig" missing from codecs (inconsistency) -> "utf8" not always a 
synonym for "utf-8" in lib2to3

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue39154>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to