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 steve.dower
Recipients Drekin, ezio.melotti, paul.moore, steve.dower, terry.reedy, tim.golden, vstinner, zach.ware
Date 2016-10-07.22:08:01
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1475878081.73.0.350469748868.issue28333@psf.upfronthosting.co.za>
In-reply-to
Content
This may force issue17620 into 3.6 - we really ought to be getting and using sys.stdin and sys.stderr in PyOS_StdioReadline() rather than going directly to the raw streams.

The problem here is that we're still using fprintf to output the prompt, even though we know (assume) the input is utf-8.

I haven't looked closely at how safely we can use Python objects from this code, except to see that it's not obviously safe, but we should really figure out how to deal in Python str rather than C char* for the default readline implementation (and then only fall back on the GNU protocol when someone asks for it).

The faster fix here would be to decode the prompt from utf-8 to utf-16-le in PyOS_StdioReadline and then write it using a wide-char output function.
History
Date User Action Args
2016-10-07 22:08:01steve.dowersetrecipients: + steve.dower, terry.reedy, paul.moore, vstinner, tim.golden, ezio.melotti, zach.ware, Drekin
2016-10-07 22:08:01steve.dowersetmessageid: <1475878081.73.0.350469748868.issue28333@psf.upfronthosting.co.za>
2016-10-07 22:08:01steve.dowerlinkissue28333 messages
2016-10-07 22:08:01steve.dowercreate