Re: Why that query fails?

From: Igor Korot <ikorot01(at)gmail(dot)com>
To: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
Cc: "pgsql-generallists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: Why that query fails?
Date: 2026-04-26 20:38:57
Message-ID: CA+FnnTwB7gAh2WG+XGw4UdSGb5kdt=AKvoZDc=__aG50eiV4OQ@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-general

Adrian,

On Sun, Apr 26, 2026 at 3:34 PM Igor Korot <ikorot01(at)gmail(dot)com> wrote:
>
> Adrian,
>
> On Sun, Apr 26, 2026 at 3:22 PM Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com> 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 = 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<std::codecvt_utf8<wchar_t> > 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(dot)klaver(at)aklaver(dot)com

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Igor Korot 2026-04-26 22:06:30 Re: Why that query fails?
Previous Message Igor Korot 2026-04-26 20:34:08 Re: Why that query fails?