This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author christian.heimes
Recipients alexandre.vassalotti, brett.cannon, christian.heimes, gvanrossum
Date 2007-10-22.01:17:02
SpamBayes Score 0.00010234573
Marked as misclassified No
Message-id <471BFA0D.9090109@cheimes.de>
In-reply-to <1193015460.09.0.351659922484.issue1302@psf.upfronthosting.co.za>
Content
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
History
Date User Action Args
2007-10-22 01:17:03christian.heimessetspambayes_score: 0.000102346 -> 0.00010234573
recipients: + christian.heimes, gvanrossum, brett.cannon, alexandre.vassalotti
2007-10-22 01:17:03christian.heimeslinkissue1302 messages
2007-10-22 01:17:02christian.heimescreate