Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit ceab6f7

Browse files
committed
As far as I figured from the source code this function only deals with
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
1 parent a2e8e15 commit ceab6f7

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/backend/utils/mb/encnames.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Encoding names and routines for work with it. All
33
* in this file is shared bedween FE and BE.
44
*
5-
* $Id: encnames.c,v 1.10 2002/09/04 20:31:31 momjian Exp $
5+
* $Id: encnames.c,v 1.11 2002/12/05 23:21:07 momjian Exp $
66
*/
77
#ifdef FRONTEND
88
#include "postgres_fe.h"
@@ -407,7 +407,12 @@ clean_encoding_name(char *key, char *newkey)
407407
for (p = key, np = newkey; *p != '\0'; p++)
408408
{
409409
if (isalnum((unsigned char) *p))
410-
*np++ = tolower((unsigned char) *p);
410+
{
411+
if (*p >= 'A' && *p <= 'Z')
412+
*np++ = *p + 'a' - 'A';
413+
else
414+
*np++ = *p;
415+
}
411416
}
412417
*np = '\0';
413418
return newkey;

0 commit comments

Comments
 (0)