mirror of
https://github.com/python/cpython.git
synced 2025-12-11 11:31:05 +00:00
Encode Unicode arguments to split/splitlist as UTF-8. Fixes #507962.
2.2.1 bugfix candidate.
This commit is contained in:
parent
ef180dc3d0
commit
84432eb4c0
1 changed files with 2 additions and 2 deletions
|
|
@ -1191,7 +1191,7 @@ Tkapp_SplitList(PyObject *self, PyObject *args)
|
||||||
PyObject *v;
|
PyObject *v;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
if (!PyArg_ParseTuple(args, "s:splitlist", &list))
|
if (!PyArg_ParseTuple(args, "et:splitlist", "utf-8", &list))
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
if (Tcl_SplitList(Tkapp_Interp(self), list, &argc, &argv) == TCL_ERROR)
|
if (Tcl_SplitList(Tkapp_Interp(self), list, &argc, &argv) == TCL_ERROR)
|
||||||
|
|
@ -1219,7 +1219,7 @@ Tkapp_Split(PyObject *self, PyObject *args)
|
||||||
{
|
{
|
||||||
char *list;
|
char *list;
|
||||||
|
|
||||||
if (!PyArg_ParseTuple(args, "s:split", &list))
|
if (!PyArg_ParseTuple(args, "et:split", "utf-8", &list))
|
||||||
return NULL;
|
return NULL;
|
||||||
return Split(list);
|
return Split(list);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue