Message 76164 - Python tracker (original) (raw)
I suceeded to reproduce this issue with coLinux + UltraVNC on Win2000.
Yes, py3k claimed utf-8 error, so I tried trunk. Here is result.
*** event.keycode: 8 *** event.state: 0 *** event.char: ''
*** event.keycode: 16 *** event.state: 4 *** event.char: '\xc0\x80'
This '\xc0\x80' seems to be used in tcl as null byte '\0'. You can see this magic value in tcl source and google.
I think we should convert this to '\x00' at python side. (shouldn't treat this as utf-16)
I can see py3k + adhok.patch can output this result.
*** event.keycode: 8 *** event.state: 0 *** event.char: ''
*** event.keycode: 16 *** event.state: 4 *** event.char: '\x00'
Probably Tcl_GetUnicode does this conversion inside. (I'm not sure, because I didn't look into source code so deeply) And I'm not sure why this error doesn't happen with tk8.5.