Message257047
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. |
|
Date |
User |
Action |
Args |
2015-12-26 20:35:00 | lemburg | set | recipients:
+ lemburg, doerwalter, terry.reedy, vstinner, serhiy.storchaka, 王杰 |
2015-12-26 20:35:00 | lemburg | set | messageid: <1451162100.7.0.739057527855.issue25937@psf.upfronthosting.co.za> |
2015-12-26 20:35:00 | lemburg | link | issue25937 messages |
2015-12-26 20:35:00 | lemburg | create | |
|