summaryrefslogtreecommitdiff
path: root/lib/output
diff options
context:
space:
mode:
Diffstat (limited to 'lib/output')
-rw-r--r--lib/output/pq/pqConn.cpp1
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);
}