[Python-Dev] RE: [Patches] [Patch #100745] Fix PR #384, fixes UTF-8 en/decode

Tim Peters tim_one@email.msn.com
Thu, 6 Jul 2000 16:33:22 -0400

[moved from patches to python-dev]

[Bill Tutt]
> Code currently in unicodeobject.c needs to do 32-bit arithmetic in
> order to work. Additionally, UCS-4 characters (aka UTF-16 surrogate
> characters) require 32 bits to represent the true unicode code point of a
> surrogate pair.

But is the requirement really for *exactly* 32 bits, or for *at least* 32
bits?  The problem isn't with feebler machines, it's with higher-end ones:
on some Python platforms, even sizeof(short) == 8.  As is, your patch will
prevent Python from compiling on those.