Re: UTF-8 output problems

2007-03-10 Thread Laurent Pointal
Michael B. Trausch wrote: > I am having a slight problem with UTF-8 output with Python. I have the > following program: > > x = 0 > > while x < 0x4000: > print u"This is Unicode code point %d (0x%x): %s" % (x, x, > unichr(x)) > x += 1 > > This program works perfectly when run directly:

Re: UTF-8 output problems

2007-03-10 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, Michael B. Trausch wrote: > However, when I attempt to redirect the output to a file: > > [EMAIL PROTECTED]:~/tmp$ python test.py >f > Traceback (most recent call last): > File "test.py", line 6, in > print u"This is Unicode code point %d (0x%x): %s" % (x, x, > unic

UTF-8 output problems

2007-03-09 Thread Michael B. Trausch
I am having a slight problem with UTF-8 output with Python. I have the following program: x = 0 while x < 0x4000: print u"This is Unicode code point %d (0x%x): %s" % (x, x, unichr(x)) x += 1 This program works perfectly when run directly: [EMAIL PROTECTED]:~/tmp$ python test.py This is