Message55311
The control-spacebar binding is used in IDLE to
force open the completions window. It's causing
IDLE to exit with a utf8 decode error. Attached
is
a Tkinter cut-down
exhibiting the problem and a patch.
The cutdown runs ok on 2.6 but not on py3k because
the latter uses PyUnicode_FromString on all the
arguments and errs out when it encounters a
character outside the utf-8 range.
Strangely, on my system, control-spacebar is
sending a two byte
string, C0E8 via the %A parameter. Control-2
does
the same. Other keys with combinations of
modifier
keys send one byte.
Linux trader 2.6.18-ARCH #1 SMP PREEMPT Sun Nov
19
09:14:35 CET 2006 i686 Intel(R) Pentium(R) 4 CPU
2.40GHz GenuineIntel GNU/Linux
Can the problem be confirmed?
Using PyUnicode_FromUnicode on %A works because
the
unicode string is copied instead of decoded, and
that parameter is supposed to be unicode, in any
case.
The patch fixes the problem on my system but
should
be reviewed, especially whether the cast in the
call
to PyUnicode_FromUnicode is suitably cross-
platform.
Assigning to Neal since he's working a lot of
Unicode issues right now. I can check it in if I
get approval. |
|
| Date |
User |
Action |
Args |
| 2007-08-26 20:48:32 | kbk | set | spambayes_score: 0.0493715 -> 0.0493715 recipients:
+ kbk |
| 2007-08-26 20:48:31 | kbk | set | spambayes_score: 0.0493715 -> 0.0493715 messageid: <1188161311.7.0.864205774814.issue1028@psf.upfronthosting.co.za> |
| 2007-08-26 20:48:31 | kbk | link | issue1028 messages |
| 2007-08-26 20:48:30 | kbk | create | |
|