Ezio Melotti <ezio.melo...@gmail.com> added the comment: If you don't specify the encoding, unicode() will decode 'var' using the default ascii codec and it will fail if 'var' contains non-ascii characters. You should use var.decode(encoding) instead.
The fact that the first print is not displayed correctly is probably due to the limitation of the Windows terminal. ---------- nosy: +ezio.melotti _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue6815> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com