Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vXGP1-005qJ5-0k for pgsql-general@arkaria.postgresql.org; Sun, 21 Dec 2025 10:11:04 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vXGOz-00BZpI-2t for pgsql-general@arkaria.postgresql.org; Sun, 21 Dec 2025 10:11:02 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vXGOz-00BZpA-1l for pgsql-general@lists.postgresql.org; Sun, 21 Dec 2025 10:11:02 +0000 Received: from mail.hjp.at ([212.17.106.138] helo=rorschach.hjp.at) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vXGOx-001tV4-1G for pgsql-general@lists.postgresql.org; Sun, 21 Dec 2025 10:11:02 +0000 Received: by rorschach.hjp.at (Postfix, from userid 1000) id 3D01011E3F; Sun, 21 Dec 2025 11:10:58 +0100 (CET) Date: Sun, 21 Dec 2025 11:10:58 +0100 From: "Peter J. Holzer" To: pgsql-general@lists.postgresql.org Subject: Re: PQexecPrepared() question Message-ID: Mail-Followup-To: pgsql-general@lists.postgresql.org References: <2547700.1765940917@sss.pgh.pa.us> <9a0ce31a49f149d8d982d2b359095560655f781e.camel@cybertec.at> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="67tlfyke26vjksrp" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --67tlfyke26vjksrp Content-Type: text/plain; protected-headers=v1; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Subject: Re: PQexecPrepared() question MIME-Version: 1.0 On 2025-12-18 18:10:45 -0600, Igor Korot wrote: > std::wcstombs( params[1], table.c_str(), table.length() ); I assume that the C++ function std::wcstombs() is just a wrapper around the C function wcstombs(). According the the C standard: | The behavior of the multibyte character functions is affected by the | LC_CTYPE category of the current locale. So you need to know what your current locale is. You can find out (somewhat unintuitively) by calling setlocale(). > Invalid byte sequence for parameter $1 in UTF8 So your locale is probably not using UTF8. hjp --=20 _ | Peter J. Holzer | Story must make more sense than reality. |_|_) | | | | | hjp@hjp.at | -- Charles Stross, "Creative writing __/ | http://www.hjp.at/ | challenge!" --67tlfyke26vjksrp Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEETtJbRjyPwVTYGJ5k8g5IURL+KF0FAmlHx6kACgkQ8g5IURL+ KF1C8hAAmUgHlsgQ56LdwsfR3LZDjoRVRHrS9Awrm/8mdhZ1aqCCeCxfRyMnWnZg 4R7k9cuv8vLXA5ZgB2wGlbSBxYScLV0BmaxsNFETE+UsZqk/K2JsMskplqivXCeV A7c2A3XlXl1fnILnO5FjDhEyfc8GvXnyczsnScFtHiEwW+tyx1dcXItVhA3imsT9 qXYy4Q4FVYUfBuC3CFaOtq33Xwv+NejtR8ppYNF5pI3mq90HmrymWKssZnF8AyQy 5SZwsN0p7A5kuUT1T1wY59A981r0RcswWUzGAI4O/59UADBDs3rTGBifySRpJrgG dTjpPMFb+c32/BagqFyENoNaGKbxkDkUvZQ/dc8pAFqEFv8PSRQH+iw0DU+N3l96 XWC8Y00oHYHDAab5QOCuy95K8HbndkZ1AvBAL3rO0/XThnWTS9VNZdPlyCaWyQ0D 3rU8U5LF0sKvexjh2AlzCVb1CGQgRhtNdC0SoKcgeSd96+gJRwtRcaToCU93J8Bz IbOJ4nq229EzbvquTw04Gw+SWeogzUWmj540Dpay5rZoT1ui5h9WjZCA7O6ldrLg T1nqk+05Isde2iju+MKFcwBMnGG7tgo5cfOjz/MVob+blVnWaevg5u1g2KuO/XWK y2SgxIZ+bHLkxHnM6CPLKnQz33tfafKn5Vo1BkQ8/cvfvrbHqh8= =oy4d -----END PGP SIGNATURE----- --67tlfyke26vjksrp--