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 1wH6G4-006rfy-2I for pgsql-general@arkaria.postgresql.org; Sun, 26 Apr 2026 20:39:17 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wH6G3-00AyzF-0Y for pgsql-general@arkaria.postgresql.org; Sun, 26 Apr 2026 20:39:15 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wH6G2-00Ayz6-2h for pgsql-general@lists.postgresql.org; Sun, 26 Apr 2026 20:39:14 +0000 Received: from mail-yw1-x112b.google.com ([2607:f8b0:4864:20::112b]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1wH6G0-00000002vAf-2UH0 for pgsql-general@lists.postgresql.org; Sun, 26 Apr 2026 20:39:13 +0000 Received: by mail-yw1-x112b.google.com with SMTP id 00721157ae682-7bb0d18c7f9so49000697b3.0 for ; Sun, 26 Apr 2026 13:39:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1777235952; cv=none; d=google.com; s=arc-20240605; b=Myv6/QbOk82P87Gsashp1Ngax2456qG0F8crJ05MVRTCTIaVfCLdpuJEIsgSAsBKs4 a2vWI5P4XE5zGu/O0vtMi/JMzLX5NNZZBO2hlCjmQXhuJ+a5e1KDJhsPozKExjMlOiuD fYLd+aC+UA5JfsBgJHpTcIVaBoiP2epNlI+f9pZlsZJBpHaEHvloCMbqoZnM82WaedBy 5vvrpYCnCChs1MVK5Hj42/Ar6jzVzBS52WkV+KWVeBrmICTptu5+H95gmyj97+yYVPjh rztPC8nFg6QJwCaiVyCoHpGuG3NtQE4wI3JZMGXgqqfmfhbxy0F3IxjuRqrqFbsxhy/Z 7HOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=8YO9cCN+YG1zsKYou+mEh8eEQLIGFjB877Cb40n+nV4=; fh=xBf723vKtoVNM9Vu4Q2JI2N8bTVz6cGesqnYlEyaNGU=; b=GlbJ2Lr1grp7SI2Gd6mdKS2Y32yYaGpjWrBgmW4FSyzX3fvZWBwmRcqMHILkK6obD2 6pOKwIKCH2ktsaWL38Kcn1f19z7U7V8MBavQHqx6t6DYKkFpaICp6xXSeoM96blK1xrR iPxaQzDoC2dmv6t9liw28wrZbIsleW1lP89iK6Z5cyMczgXF5+O/GZdhOymlQBptAqf8 lYqzlYzd7/VQO8QJ9OccBQYd3jJzN3LLWNv0E8MqN+oo674eBhzUxaRnNvytHKTmk7LH +Qutof+rgpBFAI5thNXfX3PVWI48bIkPOE3/Jd6WvONl/uTg3xpyMTagyiTjV4k8S6I5 1Anw==; darn=lists.postgresql.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1777235952; x=1777840752; darn=lists.postgresql.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=8YO9cCN+YG1zsKYou+mEh8eEQLIGFjB877Cb40n+nV4=; b=B59MnNHFPQtMXtgJhwhlQhrg94CEpyPgtGBWBhvhFHZRtxpeT8bCwNld7JboEnah1I 5b7kpV5Doh2C/rgDSZlefRBAn8mHJf5ftY9r99M0FJXfWKza60fT3qmqDMw5WqRf5f4U DFmb4KhqzWsQAzmDtgs+Qgsszm9cb2xi5eUdecSjaZxJDuI1absaDaglJfobAPTZEKCS xEqM+whCrDwLTNHTeYcCu2hSZ0q8vnOi4K1ajLI/Hfqs4aJQ+y0fqlhKQ3GR6dlK+dGU ekXGf+4TVjvfv4G8sOgXkjZ58ZVAWUF3SJpOr182dn1R+GzsMBasfmpGFSkFNbZwAxEQ ie8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1777235952; x=1777840752; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=8YO9cCN+YG1zsKYou+mEh8eEQLIGFjB877Cb40n+nV4=; b=ZmEzeLqF76QhHOGvLheEZ+yCx/nZ9BWDuXpKmO833tRghynKXx0uZ/mEaDNExZTLS+ opKDixjh9MZJ+4EpiT/Wh8CkVGSqFhFhEoC5DwKepxEZn75z8n2rrrTnscjsebbgbaEf l7u8UnocI51ynDGJgTMqPSPRiVeIQbplH23Fw2H+qeko4FZ8B5qTqKW7uLZLwEZ6DztR inAjYsQKmRTuYMPJkJqI53eJ7S2DDWM5LYAkFzaKp63weuNJxrDPjYY7XIRBMTT4pm6u nnMPcvJM6fCncGvQBqJXpt3EKIoGpH66m0/KC6evbnmPZ3GlO8m5e3/Qgrseyxxz948D pkAw== X-Gm-Message-State: AOJu0YwDxRKoLeecII9hQXOV6IzkmsGIZL2mPJWByW79YlAawA6ULBG+ iyJgFbQAl/5uvfUGTEUoZspxyQK0DNqvhfTuhsrx1No/qN/BFTa7kbpwEiFBGkVdbaDJzrftDtu Tv+0y1MUBnDnYfmXwdu6Nqs74vF2Ms40= X-Gm-Gg: AeBDieumuqGdVXIElsthjv+I0OzalSak4da5awtKGg3cs+H4PfOJzGN2ivg8a8oTmLC LY8S+NxG0xmauGILm4buWf8W5akOTvgX8i4lNFKifkgWr+8r46MvKOOr65nu0dqIVe0ZrZJnwsZ Sf3gPvC1W5n5m0e2uSh7x5Ezx3ZJ7w2PC/VyErIB1KA8wu7PG86ZzBFMan+sa1DsXM2avADYLEk /bTc4kfOgwSmInTA+Fo8Zxcs/QqrpRvk468E7CTC0e8fKBMPPEaA0saT/bsIInCdc5O337Hi1I0 7TXaSsBtjjZI1B1vBLBQ1s+DOrBpj8r2LO2cebHECxA18llYnfVOYe8rNB9H+G74 X-Received: by 2002:a05:690c:87:b0:79a:b46c:e61b with SMTP id 00721157ae682-7b9ece7ab24mr445296477b3.2.1777235951838; Sun, 26 Apr 2026 13:39:11 -0700 (PDT) MIME-Version: 1.0 References: <082a4816-1f4a-4f52-bef6-97c194eebad6@aklaver.com> In-Reply-To: From: Igor Korot Date: Sun, 26 Apr 2026 15:38:57 -0500 X-Gm-Features: AVHnY4Kv1Bn4or1QDQNVIGXy9pxKgy0mhY6CgV8S_oxWfJDf2z9FCkgkdV0GvN8 Message-ID: Subject: Re: Why that query fails? To: Adrian Klaver Cc: "pgsql-generallists.postgresql.org" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Adrian, On Sun, Apr 26, 2026 at 3:34=E2=80=AFPM Igor Korot wro= te: > > Adrian, > > On Sun, Apr 26, 2026 at 3:22=E2=80=AFPM Adrian Klaver wrote: > > > > On 4/26/26 1:15 PM, Igor Korot wrote: > > > Hi, ALL, > > > [quote] > > > Thread 1 "dbhandler" hit Breakpoint 1, > > > > > 66 errorMsg.push_back( L"Error executing query: " + er= r ); > > > (gdb) p err > > > $2 =3D L"ERROR: invalid byte sequence for encoding \"UTF8\": > > > > I would think the above is a clue. > > > > Are you sure the value you are passing to the parameter is UTF8? > > Positive. > > This is what the following line should be doing: > > [code] > 57 strcpy( values[0], m_pimpl->m_myconv.to_bytes( > name.c_str() ).c_str() ); > [/code] And the conversion is as follows: [code] std::wstring_convert > m_myconv; [/code] Thank you. > > Thank you. > > > > > > 0x00\nCONTEXT: unnamed portal parameter $1\n" > > > (gdb) > > > [/quote] > > > > > > What am I doing wrong? > > > > > > Thank you. > > > > > > > > > > > > -- > > Adrian Klaver > > adrian.klaver@aklaver.com