Commit 6777e6f9 authored by Victor Stinner's avatar Victor Stinner

(Merge 3.2) Issue #12342: Improve _tkinter error message on unencodable character

parents fcd96536 7ab4192e
......@@ -990,8 +990,10 @@ AsObj(PyObject *value)
#if TCL_UTF_MAX == 3
if (ch >= 0x10000) {
/* Tcl doesn't do UTF-16, yet. */
PyErr_SetString(PyExc_ValueError,
"unsupported character");
PyErr_Format(PyExc_ValueError,
"character U+%x is above the range "
"(U+0000-U+FFFF) allowed by Tcl",
inbuf[i]);
ckfree(FREECAST outbuf);
return NULL;
#endif
......
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