public inbox for [email protected]
help / color / mirror / Atom feedFrom: Tom Lane <[email protected]>
To: Igor Korot <[email protected]>
Cc: Laurenz Albe <[email protected]>
Cc: pgsql-generallists.postgresql.org <[email protected]>
Subject: Re: PQexecPrepared() question
Date: Sun, 21 Dec 2025 00:39:23 -0500
Message-ID: <[email protected]> (raw)
In-Reply-To: <CA+FnnTwtd-YJo5zp3obQer3qfbacg5s-4b3+5PvUkL3e+5Eh4Q@mail.gmail.com>
References: <CA+FnnTygjVvSmzTHnvteuL4KEC=0P_+mF8Kn84JtNGZWUGxpUA@mail.gmail.com>
<[email protected]>
<CA+FnnTxO6kam9=mRonvsnUA1OxJxdDdQsj+ubdgFNNb9b3WMPQ@mail.gmail.com>
<[email protected]>
<CA+FnnTzE34VJWR7xkymaKEwXiiQ8j3o03m0+qcQsRr2JkRQLwQ@mail.gmail.com>
<[email protected]>
<CA+FnnTz5tcJEL12ir1nxe9q75rxaAdfBtcFUNiD4R5gW_JR23A@mail.gmail.com>
<CA+FnnTyYBNwbzFs5GqO+SMg3g60jPTsnmFwTV=_s_YboGo-68A@mail.gmail.com>
<[email protected]>
<CA+FnnTwtd-YJo5zp3obQer3qfbacg5s-4b3+5PvUkL3e+5Eh4Q@mail.gmail.com>
Igor Korot <[email protected]> writes:
> I added the following code in my app:
> res = PQexec( m_db, "SHOW client_encoding" );
> auto value = PQgetvalue( res, 0, 0 );
> PQclear( res );
> and the value of the "value" variable is "UTF8".
Okay ...
> The exact error message is:
> ERROR: invalid byte sequence for encoding UTF8: 0xdf
> CONTEXT: unnamed portal parameter $1
> on the INSERT.
client_encoding governs both the encoding that the server will
send, and the encoding that it expects to receive. You are
sending a parameter string that is not valid UTF8.
regards, tom lane
view thread (19+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected], [email protected]
Subject: Re: PQexecPrepared() question
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox