Re:Unicode In Python, Completely Demystified
by gorset on Saturday February 26, 2011 @05:28PM
(#2266680)
CPython aren't actually using unicode strings. Instead of having a sequence of codepoints, you will have either UCS2 or UCS4 strings depending on compile time options.
For example, freshly installed python3.2 from macports:
For example, freshly installed python3.2 from macports:
(Surrogates are so much fun).Python 2.7.1 compiled with UCS4:
Notice the capital U takes 8 instead of 4 hexidecimals.