summaryrefslogtreecommitdiff
path: root/src/interfaces/libpq/fe-print.c
diff options
context:
space:
mode:
authorMarc G. Fournier <scrappy@hub.org>1999-01-27 01:18:23 +0000
committerMarc G. Fournier <scrappy@hub.org>1999-01-27 01:18:23 +0000
commit2ae5d51668a4599427a801da62313584ab565c38 (patch)
treef77d6bf5d0663e426839802c5af177018bdce8c4 /src/interfaces/libpq/fe-print.c
parente27f8791f921d2a91a38ae329df88ceb4881d5ed (diff)
From: Tatsuo Ishii <t-ishii@sra.co.jp>
Included patches fix a portability problem of unsetenv() used in 6.4.2 multi-byte support. unsetenv() is only avaliable on FreeBSD and Linux so I decided to replace with putenv().
Diffstat (limited to 'src/interfaces/libpq/fe-print.c')
-rw-r--r--src/interfaces/libpq/fe-print.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/interfaces/libpq/fe-print.c b/src/interfaces/libpq/fe-print.c
index 08e111310ac..a99fc27ba26 100644
--- a/src/interfaces/libpq/fe-print.c
+++ b/src/interfaces/libpq/fe-print.c
@@ -9,7 +9,7 @@
* didn't really belong there.
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-print.c,v 1.15 1998/10/06 14:16:50 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-print.c,v 1.16 1999/01/27 01:18:23 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
@@ -506,7 +506,7 @@ PQmblen(unsigned char *s)
int encoding = -1;
str = getenv("PGCLIENTENCODING");
- if (str)
+ if (str && *str != NULL)
encoding = pg_char_to_encoding(str);
if (encoding < 0)
encoding = MULTIBYTE;