Author lemburg
Recipients doerwalter, lemburg, serhiy.storchaka, terry.reedy, vstinner, 王杰
Date 2015-12-26.20:35:00
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1451162100.7.0.739057527855.issue25937@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2015-12-26 20:35:00lemburgsetrecipients: + lemburg, doerwalter, terry.reedy, vstinner, serhiy.storchaka, 王杰
2015-12-26 20:35:00lemburgsetmessageid: <1451162100.7.0.739057527855.issue25937@psf.upfronthosting.co.za>
2015-12-26 20:35:00lemburglinkissue25937 messages
2015-12-26 20:35:00lemburgcreate