Message208954
| Author |
serhiy.storchaka |
| Recipients |
gpolo, kbk, loewis, roger.serwy, serhiy.storchaka, terry.reedy |
| Date |
2014年01月23日.15:15:00 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1390490102.86.0.0317755498486.issue20368@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
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. |
|
History
|
|---|
| 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 |
|