From bfb66f180a0e0c9efbfb708194079e491a63dcbb Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Thu, 7 Feb 2019 20:44:56 +0000 Subject: Fix ustring to string_view conversion with multi-byte chars --- libpqpp/pq-command.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libpqpp/pq-command.cpp b/libpqpp/pq-command.cpp index 81501bd..8857fb5 100644 --- a/libpqpp/pq-command.cpp +++ b/libpqpp/pq-command.cpp @@ -141,7 +141,7 @@ PQ::Command::bindParamF(unsigned int n, float v) void PQ::Command::bindParamS(unsigned int n, const Glib::ustring & s) { - paramSet(n, std::string_view(s.data(), s.length())); + paramSet(n, std::string_view(s.data(), s.bytes())); } void PQ::Command::bindParamS(unsigned int n, const std::string_view & s) -- cgit v1.2.3