Message257047
| 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. |
|