Python UTF-8 and codecs

Serge Orlov serge.orlov at gmail.com
Wed Jun 28 01:34:14 CEST 2006


On 6/27/06, Mike Currie <dev at null.com> wrote:
> Well,  not really.  It doesn't affect the result.  I still get the error
> message.  Did you get a different result?

Yes, the program succesfully wrote text file. Without magic abilities
to read the screen of your computer I guess you now get exception in
print statement. It is because you use legacy windows console (I use
unicode-capable console of lightning compiler
<http://www.python.org/pypi/Lightning%20Compiler> to run snippets of
code). You can either change console or comment out print statement or
change your program to print unicode representation: print
repr(filteredLine)



More information about the Python-list mailing list