aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHiroshi Inoue <inoue@tpf.co.jp>2002-07-30 00:48:02 +0000
committerHiroshi Inoue <inoue@tpf.co.jp>2002-07-30 00:48:02 +0000
commit67d0cb2d77187f83bb223f27fe9dbfc7846dbb7b (patch)
treef31912920844cb62b89a0283adb45a5284594c83
parentbe347dcba64e3f62313894febad62e4f08e7788a (diff)
downloadpostgresql-67d0cb2d77187f83bb223f27fe9dbfc7846dbb7b.tar.gz
postgresql-67d0cb2d77187f83bb223f27fe9dbfc7846dbb7b.zip
Fix a bug about automatic client_encoding setting.
-rw-r--r--src/interfaces/odbc/connection.c1
-rw-r--r--src/interfaces/odbc/multibyte.c1
2 files changed, 2 insertions, 0 deletions
diff --git a/src/interfaces/odbc/connection.c b/src/interfaces/odbc/connection.c
index 45a23386e33..e3c0563ec2d 100644
--- a/src/interfaces/odbc/connection.c
+++ b/src/interfaces/odbc/connection.c
@@ -999,6 +999,7 @@ another_version_retry:
if (res = CC_send_query(self, "set client_encoding to 'UTF8'", NULL, CLEAR_RESULT_ON_ABORT), res)
{
self->client_encoding = strdup("UNICODE");
+ self->ccsc = pg_CS_code(self->client_encoding);
QR_Destructor(res);
}
diff --git a/src/interfaces/odbc/multibyte.c b/src/interfaces/odbc/multibyte.c
index 17863a9ef5f..a31f2e9b4bd 100644
--- a/src/interfaces/odbc/multibyte.c
+++ b/src/interfaces/odbc/multibyte.c
@@ -401,6 +401,7 @@ CC_lookup_characterset(ConnectionClass *self)
if (res)
{
self->client_encoding = strdup(wenc);
+ self->ccsc = pg_CS_code(self->client_encoding);
QR_Destructor(res);
free(encstr);
return;