As far as I figured from the source code this function only deals with
authorBruce Momjian
Thu, 5 Dec 2002 23:21:07 +0000 (23:21 +0000)
committerBruce Momjian
Thu, 5 Dec 2002 23:21:07 +0000 (23:21 +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 af8629955dca246225d73544b17350ae336f1076..dc6623b09c155fb9e277b751360125ccb01ee8fe 100644 (file)
@@ -2,7 +2,7 @@
  * Encoding names and routines for work with it. All
  * in this file is shared bedween FE and BE.
  *
- * $Id: encnames.c,v 1.10 2002/09/04 20:31:31 momjian Exp $
+ * $Id: encnames.c,v 1.11 2002/12/05 23:21:07 momjian Exp $
  */
 #ifdef FRONTEND
 #include "postgres_fe.h"
@@ -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;