summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
Diffstat (limited to 'Objects')
-rw-r--r--Objects/stringobject.c7
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)