Printing Unicode characters

Chris Liechti cliechti at gmx.net
Thu Aug 8 02:14:25 CEST 2002


Blistex <me at privacy.net> wrote in 
news:pan.2002.08.07.16.30.54.638208.14716 at privacy.net:
> I'm testing how well my application handles Unicode characters and I have
> a snippet of code that looks like this:
> 
> for x in range(0x20, 0x7F):
>      print u'\u%x' % (x)
...

you could use the builtin "unichr()" its like "chr()" but not only for 
ascii characters.

this works also: print u"%c" % (x)

> P.S.  I've been studying Python for a day and a half now and it's so
> clean compared to Perl, I love it.

:-)) 

chris
-- 
Chris <cliechti at gmx.net>




More information about the Python-list mailing list