diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2021-06-13 23:11:37 +0100 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2021-06-13 23:11:37 +0100 |
commit | 634b05b9b97c7a481fca4e67285362c62dd4edfe (patch) | |
tree | 9917686376afedecd07a14fcd8dcc94ceca11277 /lib/output/pq | |
parent | Perform source setup in transaction (diff) | |
download | mygrate-634b05b9b97c7a481fca4e67285362c62dd4edfe.tar.bz2 mygrate-634b05b9b97c7a481fca4e67285362c62dd4edfe.tar.xz mygrate-634b05b9b97c7a481fca4e67285362c62dd4edfe.zip |
Set client char set no PQ connect
Diffstat (limited to 'lib/output/pq')
-rw-r--r-- | lib/output/pq/pqConn.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
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<PqErr>(PQstatus(conn.get()) == CONNECTION_OK, "Connection failure", conn.get()); + verify<PqErr>(!PQsetClientEncoding(conn.get(), "utf-8"), "Setting char set", conn.get()); PQsetNoticeProcessor(conn.get(), notice_processor, this); } |