Message274456
> See also get_standard_encoding() in Python/codecs.c. I suppose it is faster.
I understand that PyCodec_SurrogatePassErrors() is already called with a normalized encoding name.
With my enhanced _Py_normalize_encoding(), strange syntaxes like " utf 8 " also take the fast path.
> UTF-32 is rarely used as external encoding, but ...
Ok, I used the same design than get_standard_encoding() to match the "utf" prefix, so having a fast-path for UTF-16 and UTF-32 doesn't add new strcmp() for "latin9".
I pushed my change, so I close the issue. |
|
Date |
User |
Action |
Args |
2016-09-05 22:51:07 | vstinner | set | recipients:
+ vstinner, scop, ezio.melotti, python-dev, serhiy.storchaka |
2016-09-05 22:51:07 | vstinner | set | messageid: <1473115867.75.0.0964742137048.issue27938@psf.upfronthosting.co.za> |
2016-09-05 22:51:07 | vstinner | link | issue27938 messages |
2016-09-05 22:51:07 | vstinner | create | |
|