Kaydet (Commit) 46764489 authored tarafından Serhiy Storchaka's avatar Serhiy Storchaka

Issue #13153: Tkinter functions now raise TclError instead of ValueError when

a unicode argument contains non-BMP character.
üst 142d2bc3
...@@ -205,6 +205,9 @@ Core and Builtins ...@@ -205,6 +205,9 @@ Core and Builtins
Library Library
------- -------
- Issue #13153: Tkinter functions now raise TclError instead of ValueError when
a unicode argument contains non-BMP character.
- Issue #9669: Protect re against infinite loops on zero-width matching in - Issue #9669: Protect re against infinite loops on zero-width matching in
non-greedy repeat. Patch by Matthew Barnett. non-greedy repeat. Patch by Matthew Barnett.
......
...@@ -987,8 +987,10 @@ AsObj(PyObject *value) ...@@ -987,8 +987,10 @@ AsObj(PyObject *value)
for (i = 0; i < size; i++) { for (i = 0; i < size; i++) {
if (inbuf[i] >= 0x10000) { if (inbuf[i] >= 0x10000) {
/* Tcl doesn't do UTF-16, yet. */ /* Tcl doesn't do UTF-16, yet. */
PyErr_SetString(PyExc_ValueError, PyErr_Format(Tkinter_TclError,
"unsupported character"); "character U+%x is above the range "
"(U+0000-U+FFFF) allowed by Tcl",
(int)inbuf[i]);
ckfree(FREECAST outbuf); ckfree(FREECAST outbuf);
return NULL; return NULL;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment