|
As I say in the article: "if possible, use a Python install compiled to use UCS4 character storage." Micah Dubinko asked how to check whether your current Python build is such. The best test right now is to take advantage of one of the bugs present in UCS2 builds and not UCS4 builds. The test that Eric van der Vlist came up with, for example:
if len(u'\U00010800') == 1:
print "UCS4"
else: #len is 2 in UCS2 builds
print "UCS2"
|