[issue20368] Tkinter: handle the null character

2014-02-04 Thread Roundup Robot
Roundup Robot added the comment: New changeset d83ce3a2d954 by Christian Heimes in branch '3.3': Issue #20515: Fix NULL pointer dereference introduced by issue #20368 http://hg.python.org/cpython/rev/d83ce3a2d954 New changeset 145032f626d3 by Christian Heimes in branch 'default': Issue #20515:

[issue20368] Tkinter: handle the null character

2014-02-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: But, how many of the replacement sites are exercised by the tests? I added tests for most the replacement sites and updated tests has even more tests. split() and splitlist() -- tested. Unfortunately they are tested only for bytes argument because these

[issue20368] Tkinter: handle the null character

2014-02-03 Thread Terry J. Reedy
Terry J. Reedy added the comment: With the additional tests, it seems reasonable to apply. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20368 ___

[issue20368] Tkinter: handle the null character

2014-02-03 Thread Roundup Robot
Roundup Robot added the comment: New changeset a6ba6db9edb4 by Serhiy Storchaka in branch '2.7': Issue #20368: Add tests for Tkinter methods exprstring(), exprdouble(), http://hg.python.org/cpython/rev/a6ba6db9edb4 New changeset 825c8db8b1e2 by Serhiy Storchaka in branch '3.3': Issue #20368:

[issue20368] Tkinter: handle the null character

2014-02-03 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20368

[issue20368] Tkinter: handle the null character

2014-02-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: If there are no objections I'll commit this patch tomorrow. -- assignee: - serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20368 ___

[issue20368] Tkinter: handle the null character

2014-02-02 Thread Terry J. Reedy
Terry J. Reedy added the comment: The core of the patch is a wrapper that traps UnicodeDecodeErrors, corrects the strings, and re-decodes. A Python version might look like def unicodeFromTclStringAndSize(s, size): try: return PyUnicode_DecodeUTF8(s, size, NULL) except

[issue20368] Tkinter: handle the null character

2014-01-23 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: 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