Ricardo Bugalho wrote:
 thanks for the information. But what I was really looking for was
informaion on when and why Python started doing it (previously, it always
used sys.getdefaultencoding())) and why it was done only for 'print' when
stdout is a terminal instead of always.

It does that since 2.2, in response to many complains that you cannot print a Unicode string in interactive mode, unless the Unicode string contains only ASCII characters. It does that only if sys.stdout is a real terminal, because otherwise it is not possible to determine what the encoding of sys.stdout is.

Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to