[issue1028] Tkinter binding involving Control-spacebar raises unicode error

Guilherme Polo report at bugs.python.org
Mon Dec 1 18:45:17 CET 2008


Guilherme Polo <ggpolo at gmail.com> added the comment:

Some more clarifications about this bug:

Tcl shouldn't be giving us a UTF-8 string with a 0xC0 byte, since that
is not valid UTF-8. I'm aware that Tcl uses the sequence 0xC0 0x80 for
special purposes but it is also said that such sequences shouldn't be
passed as is when exported.

This bug doesn't affect python 2.x because it uses PyString_FromString
to convert such value to a Python string, where python 3.x uses
PyUnicode_FromString which assumes that it is receiving a valid utf-8
string but it turns out that is not always the case here.

It is indeed related to tk 8.4, but not sure which ones exactly (I hit
it with tk 8.4.19).

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


More information about the Python-bugs-list mailing list