[issue15809] 2.7 IDLE console uses incorrect encoding.

Terry J. Reedy report at bugs.python.org
Thu May 15 20:34:12 CEST 2014


Terry J. Reedy added the comment:

Idle 3.x has Martin's patch, except that the 'if' clause is merely commented out rather than removed. (Perhaps someone wanted to test the removal first.  It should now be deleted.)

My 2.7 Idle has Default Source Encoding ... [x] None. Since there is nothing for this in either config-main.def, I presume it is the default -- at least for Windows. But Martin says it is not relevant.

'Surprising' suggests that you think or know that doing the same in 2.7 might introduce other discrepancies from console behavior. I am reluctant to do that, though it is possible that it might make Idle *better* than the console.

I would definitely be reluctant to do something more wide-ranging than your patch without extensive tests, and even that patch should have some tests, some of which pass now and continue to pass, and other that fail now and pass with the patch.

Irdb said "As a Windows user, currently I can't print u'йцук' in interactive mode and get an "Unsupported characters in input" error because my default system encoding (cp1256) can't encode Russian.)"

Idle 2.7
>>> u'йцук'
Unsupported characters in input

Console 2.7
>>> u'????'
u'????'
>>> u'????'[0] == '?'
True

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue15809>
_______________________________________


More information about the Python-bugs-list mailing list