Help for unicode

David Eppstein eppstein at
Sun Nov 9 20:27:21 CET 2003

In article <2perb.101236$vO5.3965040 at>,
 "Noixe" <NoixeTOGLIMI at> wrote:

> If I write:
> print u'\u2205'
> I have this error: UnicodeError: ASCII encoding error: ordinal not in
> range(128)
> Why? I must include some module?

You have to specify which encoding you want to print it in.
>>> print u'\u2205'.encode('utf8')

Of course this will only work if the output stream you print to is set 
up to use that encoding...

David Eppstein            
Univ. of California, Irvine, School of Information & Computer Science

More information about the Python-list mailing list