[Pythonmac-SIG] Newbie: Unicode in Python 2.3?

Philippe de Rochambeau philippe at wwphi.net
Sat Mar 20 12:56:41 EST 2004


Hello,

I am trying to use Unicode with the Macosx 10.3 built-in Python 2.3 
interpreter. However, I keep getting messages telling me that the 
character value is not within the right range (128)

 >>> import codecs
 >>> alef = unichr(1488)
 >>> print alef
Traceback (most recent call last):
   File "<stdin>", line 1, in ?
UnicodeEncodeError: 'ascii' codec can't encode character '\u5d0' in 
position 0: ordinal not in range(128)
 >>>

How can you find out if a particular version of Python supports Unicode 
or not?

Many thanks.

Philippe





More information about the Pythonmac-SIG mailing list