[Python-Dev] please consider changing --enable-unicode default to ucs4 (original) (raw)

Björn Lindqvist bjourne at gmail.com
Tue Sep 29 17:17:25 CEST 2009


2009/9/28 James Y Knight <foom at fuhm.net>:

People building their own Python version will usually also build their own extensions, so I don't really believe that the above scenario is very common. I'd just like to note that I've run into this trap multiple times. I built a custom python, and expected it to work with all the existing, installed, extensions (same major version as the system install, just patched). And then had to build it again with UCS4, for it to actually work. Of course building twice isn't the end of the world, and I'm certainly used to having to twiddle build options on software to get it working, but, this does happen, and is a tiny bit irritating.

I've also encountered this trap multiple times. Obviously, the problem is not rebuilding Python which is quick, but to figure out the correct configure option to use (--enable-unicode=ucs4). Others have also spent some time scratching their heads over the strange PyUnicodeUCS4_FromUnicode error the misconfiguration results in, as Zooko's links show.

If Python can't infer the unicode setting from the width of the platforms wchar_t, then perhaps it should be mandatory to specify to configure whether you want UCS2 or UCS4? For someone clueless like me, it would be easier to deal with the problem upfront than (much) further down the line. Explicit being better than implicit and all that.

-- mvh Björn



More information about the Python-Dev mailing list