[XML-SIG] Python 2.4.2, OS X, ucs4 build, unicodedata problem

Ken Beesley ken.beesley at xrce.xerox.com
Sun Feb 12 14:20:49 CET 2006

Python 2.4.2, OS X, ucs4 build, unicodedata problem

I need a ucs4 build of Python to reliably handle XML files that
can contain supplemental Unicode characters (newer characters
beyond the Basic Multilingual Plane). I recently upgraded to OS X
10.4.4 and downloaded (from http://www.python.org/download) the
sources for Python 2.4.2. After detarring the package, I did

./configure --enable-framework --enable-unicode-ucs4
sudo make install

Which created and installed a 2.4.2 Python executable,

I can run it, and I confirmed that it is a ucs4 build, e.g.


returns 1, rather than the 2 returned by a ucs2 build. (Python 2.3.5,
supplied with 10.4, is a ucs2 build.)

THE PROBLEM: when I try (manually, or in a script) to import the
unicodedata package, I get the traceback below, which seems to
complain about a symbol __PyUnicodeUCS2_ToNumeric not being
found when the unicodedata module is imported.

Has anyone out there seen or dealt with this problem?
Am I just doing something wrong?



*********************** Traceback ****************************

% python
Python 2.4.2 (#2, Oct 24 2005, 22:26:37)
[GCC 3.3 20030304 (Apple Computer, Inc. build 1666)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
 >>> import unicodedata
Traceback (most recent call last):
File "<stdin>", line 1, in ?
ImportError: Failure linking new module: /Library/Frameworks/ 
Python.framework/Versions/2.4/lib/python2.4/lib-dynload/ unicodedata.so: 
Symbol not found: __PyUnicodeUCS2_ToNumeric
Referenced from: /Library/Frameworks/Python.framework/Versions/2.4/ 
Expected in: dynamic lookup

More information about the XML-SIG mailing list