Christian Heimes added the comment: Alexandre Vassalotti wrote: > I don't think it's possible to add shortcuts in PyUnicode_Decode for > UTF-16 and UTF-32 because the byte-order can be different depending of > the platform. So, these two need to pass through the codecs module.
utf-16 and utf-32 are the the names for the native codecs. The explicit names are e.g. utf-16-be or utf-32-le. The last argument 0 also means "native byte order". I used a shorter algorithm to optimize the normalization for the special cases of the strcmp() shortcuts. Your version is fine but takes several CPU cycles longer. I don't think it has a large performance impact. ;) Christian __________________________________ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1302> __________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com