Steve Dower added the comment:

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.

----------
keywords: +3.5regression
stage:  -> needs patch
versions: +Python 3.7

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue28333>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to