From c6630b9291544fd875aa0c1cb0b11a840abb1d29 Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Sun, 15 Jan 2012 21:33:32 -0500 Subject: [PATCH] fix old titlecase function for extended case chars --- Objects/unicodectype.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Objects/unicodectype.c b/Objects/unicodectype.c index b21fd35a4a4..a572c12bcc8 100644 --- a/Objects/unicodectype.c +++ b/Objects/unicodectype.c @@ -65,6 +65,8 @@ Py_UCS4 _PyUnicode_ToTitlecase(register Py_UCS4 ch) { const _PyUnicode_TypeRecord *ctype = gettyperecord(ch); + if (ctype->flags & EXTENDED_CASE_MASK) + return _PyUnicode_ExtendedCase[ctype->title & 0xFFFF]; return ch + ctype->title; }