Marc-Andre Lemburg added the comment:

Please fold these cases into one:

     if (strcmp(buf, "utf-8") == 0 ||
         strncmp(buf, "utf-8-", 6) == 0)
         return "utf-8";
     else if (strcmp(buf, "utf8") == 0 ||
         strncmp(buf, "utf8-", 6) == 0)
         return "utf-8";

->

     if (strcmp(buf, "utf-8") == 0 ||
         strncmp(buf, "utf-8-", 6) == 0 ||
         strcmp(buf, "utf8") == 0 ||
         strncmp(buf, "utf8-", 6) == 0)
         return "utf-8";

Also: I wonder why the regular utf_8.py codec doesn't complain about this case, 
since the above are only shortcuts for frequently used source code encodings.

----------

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

Reply via email to