Issue #1813: Fix codec lookup and setting/getting locales under Turkish locales.
diff --git a/Python/codecs.c b/Python/codecs.c
index 57bd0f4..7334eb3 100644
--- a/Python/codecs.c
+++ b/Python/codecs.c
@@ -70,7 +70,7 @@
         if (ch == ' ')
             ch = '-';
         else
-            ch = tolower(Py_CHARMASK(ch));
+            ch = Py_TOLOWER(Py_CHARMASK(ch));
         p[i] = ch;
     }
     return v;