c6247fd
diff -up Python-2.7rc1/Python/codecs.c.ascii-tolower Python-2.7rc1/Python/codecs.c
c6247fd
--- Python-2.7rc1/Python/codecs.c.ascii-tolower	2010-05-09 10:46:46.000000000 -0400
c6247fd
+++ Python-2.7rc1/Python/codecs.c	2010-06-06 05:06:15.373100357 -0400
59062c0
@@ -45,6 +45,11 @@ int PyCodec_Register(PyObject *search_fu
59062c0
     return -1;
59062c0
 }
59062c0
 
59062c0
+/* isupper() forced into the ASCII Locale */
59062c0
+#define ascii_isupper(x) (((x) >= 0x41) && ((x) <= 0x5A))
59062c0
+/* tolower() forced into the ASCII Locale */
59062c0
+#define ascii_tolower(x) (ascii_isupper(x) ? ((x) + 0x20) : (x))
59062c0
+
59062c0
 /* Convert a string to a normalized Python string: all characters are
59062c0
    converted to lower case, spaces are replaced with underscores. */
59062c0
 
59062c0
@@ -70,7 +75,7 @@ PyObject *normalizestring(const char *st
59062c0
         if (ch == ' ')
59062c0
             ch = '-';
59062c0
         else
59062c0
-            ch = tolower(Py_CHARMASK(ch));
59062c0
+            ch = ascii_tolower(Py_CHARMASK(ch));
c6247fd
         p[i] = ch;
59062c0
     }
59062c0
     return v;