diff options
Diffstat (limited to 'Objects')
-rw-r--r-- | Objects/stringobject.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Objects/stringobject.c b/Objects/stringobject.c index 9598ffb..2613c62 100644 --- a/Objects/stringobject.c +++ b/Objects/stringobject.c @@ -3933,6 +3933,13 @@ PyString_Format(PyObject *format, PyObject *args) fill = '0'; break; case 'c': +#ifdef Py_USING_UNICODE + if (PyUnicode_Check(v)) { + fmt = fmt_start; + argidx = argidx_start; + goto unicode; + } +#endif pbuf = formatbuf; len = formatchar(pbuf, sizeof(formatbuf), v); if (len < 0) |