print() and unicode strings (python 3.1)
Stefan Behnel
stefan_ml at behnel.de
Mon Aug 24 14:19:28 EDT 2009
7stud wrote:
> python 3.1 won't let me
> explicitly encode my unicode string
Sure it does. But encoding a non-ASCII string to ASCII will necessarily fail.
> and python 3.1 implicitly does
> the encoding with the wrong codec.
That's not a Python problem, though. Your terminal is configured for
US-ASCII, so you can't output anything but US-ASCII characters.
Change your terminal setup to e.g. UTF-8 and see how things start working.
Stefan
More information about the Python-list
mailing list