]> granicus.if.org Git - postgresql/commitdiff
Multi-byte case fix by Oliver Elphick (olly@lfix.co.uk)
authorTatsuo Ishii <ishii@postgresql.org>
Wed, 12 Jan 2000 13:08:55 +0000 (13:08 +0000)
committerTatsuo Ishii <ishii@postgresql.org>
Wed, 12 Jan 2000 13:08:55 +0000 (13:08 +0000)
src/bin/scripts/createdb

index 14aad8b890e3e3ee4cd9bca41259076374384e44..7a7286c57510072293f97d8987acb82991e684b8 100644 (file)
@@ -11,7 +11,7 @@
 #
 #
 # IDENTIFICATION
-#    $Header: /cvsroot/pgsql/src/bin/scripts/Attic/createdb,v 1.4 1999/12/16 20:10:02 momjian Exp $
+#    $Header: /cvsroot/pgsql/src/bin/scripts/Attic/createdb,v 1.5 2000/01/12 13:08:55 ishii Exp $
 #
 #-------------------------------------------------------------------------
 
@@ -121,8 +121,10 @@ if [ "$usage" ]; then
 fi
 
 
-if [ "$MB" ]
-then   if [ -z "`pg_encoding '$MB'`" ]
+if [ -n "$MB" ]
+then
+        mbcode=`pg_encoding "$MB"`
+        if [ -z "$mbcode" ]
        then
                echo "$CMDNAME: \"$MB\" is not a valid encoding name."
                exit 1