As far as I figured from the source code this function only deals with
authorBruce Momjian <[email protected]>
Mon, 9 Dec 2002 17:45:17 +0000 (17:45 +0000)
committerBruce Momjian <[email protected]>
Mon, 9 Dec 2002 17:45:17 +0000 (17:45 +0000)
cleaning up locale names and nothing else. Since all the locale names
are in plain  ASCII I think it will be safe to use ASCII-only lower-case
conversion.

Nicolai Tufar

src/backend/utils/mb/encnames.c

index d06e918b755a01657968c34e933541fbe46f2e2b..834ae5bed7b3805d2f95e10d4e2eeb6ab51f2470 100644 (file)
@@ -407,7 +407,12 @@ clean_encoding_name(char *key, char *newkey)
        for (p = key, np = newkey; *p != '\0'; p++)
        {
                if (isalnum((unsigned char) *p))
-                       *np++ = tolower((unsigned char) *p);
+               {
+                       if (*p >= 'A' && *p <= 'Z')
+                               *np++ = *p + 'a' - 'A';
+                       else
+                               *np++ = *p;
+               }
        }
        *np = '\0';
        return newkey;