Commit 67d0cb2d authored by Hiroshi Inoue's avatar Hiroshi Inoue

Fix a bug about automatic client_encoding setting.

parent be347dcb
......@@ -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);
}
......
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment