From 634b05b9b97c7a481fca4e67285362c62dd4edfe Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sun, 13 Jun 2021 23:11:37 +0100 Subject: Set client char set no PQ connect --- lib/output/pq/pqConn.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/output') diff --git a/lib/output/pq/pqConn.cpp b/lib/output/pq/pqConn.cpp index ba95cad..76a3a75 100644 --- a/lib/output/pq/pqConn.cpp +++ b/lib/output/pq/pqConn.cpp @@ -18,6 +18,7 @@ namespace MyGrate::Output::Pq { PqConn::PqConn(const char * const str) : connstr {str}, conn {PQconnectdb(str), PQfinish} { verify(PQstatus(conn.get()) == CONNECTION_OK, "Connection failure", conn.get()); + verify(!PQsetClientEncoding(conn.get(), "utf-8"), "Setting char set", conn.get()); PQsetNoticeProcessor(conn.get(), notice_processor, this); } -- cgit v1.2.3