Message208954
Tcl/Tk uses modified UTF-8 encoding to represent strings as C strings (char*). Because C strings are NUL-terminated, the null character represented as illegal UTF-8 sequence \xc0\x80.
Current Tkinter code is not very aware about this. It has special handling the "\xc0\x80" string (i.e. encoded single null character) in one place, but doesn't handle encoded null character contained in larger string. As result Tkinter may truncate strings contained the null character, or return wrong result.
The proposed patch fixes many issues with the null character (converting from Tcl to Python strings). NUL is still forbidden in string arguments of many methods.
Also the patch enhances error handling for variable-related commands. |
|
Date |
User |
Action |
Args |
2014-01-23 15:15:03 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, loewis, terry.reedy, kbk, gpolo, roger.serwy |
2014-01-23 15:15:02 | serhiy.storchaka | set | messageid: <1390490102.86.0.0317755498486.issue20368@psf.upfronthosting.co.za> |
2014-01-23 15:15:02 | serhiy.storchaka | link | issue20368 messages |
2014-01-23 15:15:02 | serhiy.storchaka | create | |
|