[Python-Dev] Support for "wide" Unicode characters

M.-A. Lemburg mal@egenix.com
Mon, 02 Jul 2001 11:39:55 +0200


Greg Ewing wrote:
> 
> > It so happened that the Unicode support was written to make it very
> > easy to change the compile-time code unit size
> 
> What about extension modules that deal with Unicode strings?
> Will they have to be recompiled too? If so, is there anything
> to detect an attempt to import an extension module with an
> incompatible Unicode character width?

That's a good question ! 

The answer is: yes, extensions which use Unicode will have to
be recompiled for narrow and wide builds of Python. The question
is however, how to detect cases where the user imports an
extension built for narrow Python into a wide build and
vice versa.

The standard way of looking at the API level won't help. We'd
need some form of introspection API at the C level... hmm,
perhaps looking at the sys module will do the trick for us ?!

In any case, this is certainly going to cause trouble one
of these days...

-- 
Marc-Andre Lemburg
CEO eGenix.com Software GmbH
______________________________________________________________________
Company & Consulting:                           http://www.egenix.com/
Python Software:                        http://www.lemburg.com/python/