Paul McGuire schrieb: > -- > Weird. What happens if you change the second print statement to: > print b.center(6,u"-") Same behavior.
I have an even more minimal example: :> python -c 'print unicode("ä", "utf8")' ä :> python -c 'print unicode("ä", "utf8")' | cat Traceback (most recent call last): File "<string>", line 1, in <module> UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-1: ordinal not in range(128) Just the difference of having piped the output to another program or to a file. Maybe we leave the other issue with the different centering for the moment. My goal is to have my python programs unicode enabled. TIA -- Kurt Mueller -- Kurt Müller, m...@problemlos.ch -- http://mail.python.org/mailman/listinfo/python-list