diff options
-rw-r--r-- | Objects/unicodeobject.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c index 1fb5742..b2279a6 100644 --- a/Objects/unicodeobject.c +++ b/Objects/unicodeobject.c @@ -1772,6 +1772,9 @@ unicode_char(Py_UCS4 ch) assert(ch <= MAX_UNICODE); + if (ch < 256) + return get_latin1_char(ch); + unicode = PyUnicode_New(1, ch); if (unicode == NULL) return NULL; |