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 1wH7ck-006sjr-0F for pgsql-general@arkaria.postgresql.org; Sun, 26 Apr 2026 22:06:46 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wH7cj-00BClp-03 for pgsql-general@arkaria.postgresql.org; Sun, 26 Apr 2026 22:06:45 +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 1wH7ci-00BClh-27 for pgsql-general@lists.postgresql.org; Sun, 26 Apr 2026 22:06:44 +0000 Received: from mail-yw1-x1133.google.com ([2607:f8b0:4864:20::1133]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1wH7cg-00000002vkz-2IhL for pgsql-general@lists.postgresql.org; Sun, 26 Apr 2026 22:06:43 +0000 Received: by mail-yw1-x1133.google.com with SMTP id 00721157ae682-79a2ee65171so109971887b3.2 for ; Sun, 26 Apr 2026 15:06:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1777241202; cv=none; d=google.com; s=arc-20240605; b=MwqG5PXKiA8o3X5Tq7/a1Ug1opJ4W+m7bGTrl4mjEFzzBnXBJe/EU79xtFatd9Uukh RuTACDT4rPnhnnuzJS5qpz5yO9EQH7n13PbE3UyHGl3DRkS3K0uhGu+yR+b5VZtS2fku pTnDpc97qNA5Z2j/6U5g/oKw2dD5R7zynQr7pRiWVCYph7UVnm6QaSViON/DgwIj3AUc /V1LSafxff+oDedSfvCUm9vjOb362LP7oT8fm9Saa8Em3eb4qKuH6AGrWpX+CAVudRIK mD6eyUjGOf4ps2SoN2xDxK1u+fL6s/vVF/5NzakHTZ/+nwNepIIoZvU87XRe5jC1S02M AqfQ== 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=bZxf0L7YZ63nZI5eLiIDlXF65JxIg+QwDmQBVu3ZhBg=; fh=xBf723vKtoVNM9Vu4Q2JI2N8bTVz6cGesqnYlEyaNGU=; b=NV0cTa4l9RQ93Q5rQC7B+93mAWIKc8A+PMymOtBrrQlUvYpA2uKkXZ/XbwOnmeThqW 04BDvPOaD/mRCjE09CZgCJ6YfroMXHNM6yST6Ek5qgYAkdo4PJ1cO8Nbm8wn7cqP4c+V haWUsHd+FeJRO/TYAV200DeuKCFxcPcNJbeDBlxWQLuFEO5kXMsp+rg7ohBDfZwfCcNG dSL2PJREpui5/lQaJ2xpyYYwEOuh9y34Qxe5HfAwhjsCM/YuPr/Dl+DOV3n/c1BvqmiN LuW/XQpX9Xh0g4rpmO5fQwZmeBSH8Aj7/6MQFyvfaC4k2Qpfzjo5/CVLXh/co3PY8Oj7 Fjnw==; 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=1777241202; x=1777846002; 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=bZxf0L7YZ63nZI5eLiIDlXF65JxIg+QwDmQBVu3ZhBg=; b=GNLN0MwrOpiB9Jz2lftRpDuEKFOGtV2aFkgjxsND5MiwUL4zYe3TqJxPAsbv/c/Glb 0LVcqqFcF8CxyGH0WocIP6uJvEb2l6mvF4+lZu6Vp7e2Ecsnwr6Ky4MLA8d0P1xX5Nzj evtfDaCJvhj74WzSZ6TlVJEl53DLhXF73omGjHO3aQkfsnalv07Ckc63T9Zas0YVA0/Z m4MMS7Wl3S7Ge+zY+uM2Y90t4KUg1vuYUnpDIRysNQpO7rZCcvixjW2U3MgOAPzPWWYa yBEjTGjgx/mJ25wzxMxpI6JpcrqU+3A+PG2kOPlAQyC9nvqolcZpsjXpv3TLEL2vf8rT +1YA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1777241202; x=1777846002; 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=bZxf0L7YZ63nZI5eLiIDlXF65JxIg+QwDmQBVu3ZhBg=; b=Lw9vnpXxgJU9kp6bB1g8K8BchDT+xJ6daUler0nOwJN8ACyRSV7yaoGkks7eTGSkMn 9ICDFYRhrmkT2NBgUb1w+/V9ryQIZ783jlteIYqu6cOmxdrhBqc31rXS/O8mC6zrDsOu PxKp4Xj8k9GTendxJ1Ocn9bih2azSC8JAwntY6gC91TbCyjDn6O6GEYwEKwjrYCs5zaD vwCVfb3YRRWflDEESIfjohiYvcACi864VkVZdhGABLhyElX7hl7cuftYO4/j244AaPux FWaZznOsTSwrM2+YOERZbsl/5wFF7xpTWvurCqqkSGuHULXaxK/4udgHc7f0APtKBoVE wxlg== X-Gm-Message-State: AOJu0YxO0Iy+ysTn3358h5d2IjYCMMiIyB4S+0/V7Ger92Mv7v5ft/22 8TxQVjN/NIh2XARwMmA7oNTcVb8CbCi5FALvX3ufyUQwvJcmtDpz0dtEigARyW9twuZTYuyCGI4 iKOJb0pZ+tDD8x+JaX6eJHtAv1tdhYgyeTAXG X-Gm-Gg: AeBDies0VHo1I7OxgGfjfexAEqDa294S6I5ZJzId+jtpbz8rdgG4XQ46jXe+eTSg5N9 bR6JZpzpXS/9CV1FO2mAwRGgbH8bS/9LWLwugfe1pegliWW0hfg9IWvjZuOb5kDNbGbtuVYfyav 6ASHEulDt3AQV7MOftMzNCL6KHEWek2ToEw9nNUolsZg36WiK3iAoqeSH0i57UKQ8la4xPXcfhy YMX1F81T6MpSHZ542VacNSnmrCU+mGR5Uc6R+MItnfugm8y+Lzr4MtRbUG1iV6VhrhzNWe2NUXP W6dwY3A3cY9rF991YAWkQ9uieFYntja4LTdoTc0Fd7v8085eo21JMyYE41EWGjO/XWGXaxvnnZg = X-Received: by 2002:a05:690c:39a:b0:7b4:ad41:4845 with SMTP id 00721157ae682-7b9ecfdafc1mr419185457b3.41.1777241202060; Sun, 26 Apr 2026 15:06:42 -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 17:06:30 -0500 X-Gm-Features: AVHnY4KuYyO5VBPScwAHUIqQA3tHgONczizG-qSHde9Puy30gjDpYg1GlaUX6qg 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:38=E2=80=AFPM Igor Korot wro= te: > > Adrian, > > On Sun, Apr 26, 2026 at 3:34=E2=80=AFPM Igor Korot w= rote: > > > > 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: " + = err ); > > > > (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. Those are the values from gdb: [code] (gdb) p values[0] $1 =3D 0x603001613380 "test" (gdb) p strlen(values[0]) $2 =3D 4 (gdb) [/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