Message105676
| Author |
vstinner |
| Recipients |
amaury.forgeotdarc, belopolsky, dangyogi, flox, gruszczy, r.david.murray, vstinner |
| Date |
2010年05月14日.01:20:12 |
| SpamBayes Score |
2.944776e-05 |
| Marked as misclassified |
No |
| Message-id |
<201005140317.33456.victor.stinner@haypocalc.com> |
| In-reply-to |
<1273709714.4.0.35932325802.issue8256@psf.upfronthosting.co.za> |
| Content |
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. |
|