[PyPy-issue] [issue712] Cannot change encoding used by print statement?
pypy-dev-issue at codespeak.net
Tue May 3 11:35:06 CEST 2011
New submission from Gerlof Bouma <gerlof.bouma at gmail.com>:
Using the print *statement* to write to a file with an encoding other than ascii
doesn't seem to work, raising a EncodingError even if writing is handled through
the codecs module and is supposed to be able to handle, say, utf8. The issue
does not show up when using __future__.print_function or f.write(...).
Attached is a file demonstrating the contrast between ".write(bla)" and "print
bla". In the example I used sys.stdout but the problem is the same with printing
to a (proper) file.
The problem shows up in pypy 1.4 and 1.5. CPython doesn't have the issue.
nosy: gjb, pypy-issue
title: Cannot change encoding used by print statement?
PyPy development tracker <pypy-dev-issue at codespeak.net>
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 532 bytes
Desc: not available
More information about the Pypy-issue