Fix a bug about automatic client_encoding setting.

This commit is contained in:
Hiroshi Inoue 2002-07-30 00:48:02 +00:00
parent be347dcba6
commit 67d0cb2d77
2 changed files with 2 additions and 0 deletions

View File

@ -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);
}

View File

@ -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;