[Python-3000] UTF-16

Barry Warsaw barry at python.org
Fri Sep 1 14:14:46 CEST 2006

On Sep 1, 2006, at 2:49 AM, Fredrik Lundh wrote:

> Guido van Rossum wrote:
>> I think it would be best to do this as a CPython configuration option
>> just like it's done today. You can choose 4-byte or 2-byte Unicode
>> (essentially UCS-4 or UTF-16) in order to be compatible with other
>> packages on the platform. Yes, 4-byte gives better Unicode support.
>> But 2-bytes may be more compatible with other stuff on the platform.
>> Too bad .NET and Java don't have this option. :-)
> the UCS2/UCS4 linking problems is a minor pain in the ass, though.
> maybe this is best done via a run-time setting?

Yes, the linking problem does crop up from time to time.  Recent  
example: Gentoo Linux is heavily dependent on Python and I recently  
emerged in several packages.  I don't remember the exact details, but  
there was a conflict between UCS2 and UCS4 where two different  
upstream packages required two different linkages, and the wrapping  
Python modules were thus incompatible.  I basically had to decide  
which one I cared about most and delete the other to resolve the  
conflict.  The problem was confusing the hell out of several  
Gentooers until we tracked down all the resources and figured out the  
(suboptimal) fix.


More information about the Python-3000 mailing list