mirror of
https://github.com/python/cpython.git
synced 2024-11-27 20:04:41 +08:00
Issue #12342: Improve _tkinter error message on unencodable character
This commit is contained in:
parent
b3bc7e764d
commit
7ab4192e82
@ -993,8 +993,10 @@ AsObj(PyObject *value)
|
||||
for (i = 0; i < size; i++) {
|
||||
if (inbuf[i] >= 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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user