This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients amaury.forgeotdarc, belopolsky, dangyogi, flox, gruszczy, r.david.murray, vstinner
Date 2010-05-14.01:20:12
SpamBayes Score 2.94478e-05
Marked as misclassified No
Message-id <>
In-reply-to <>
Here is a patch catching the _PyUnicode_AsString() error.

input() uses sys.stdout.encoding to encode the prompt to a byte string, but 
PyOS_StdioReadline() writes the prompt to stderr (it should use sys_stdout).

I don't know which encoding should be used if sys.stdout.encoding is None (eg. 
if sys.stdout is a StringIO() object).

StringIO() of _io module has no encoding because it stores unicode characters, 
not bytes. StringIO() of _pyio module is based on BytesIO() and use utf8 
encoding, but the reference implementation is now _io.
File name Uploaded
input_stdout_encoding.patch vstinner, 2010-05-14.01:20:12
Date User Action Args
2010-05-14 01:20:16vstinnersetrecipients: + vstinner, amaury.forgeotdarc, belopolsky, dangyogi, r.david.murray, gruszczy, flox
2010-05-14 01:20:13vstinnerlinkissue8256 messages
2010-05-14 01:20:12vstinnercreate