Re: PQexecPrepared() question - Mailing list pgsql-general

From Peter J. Holzer
Subject Re: PQexecPrepared() question
Date
Msg-id exzgttcvkt27rlddmioxcrxymzz4ks4lefwltwpl4d7sal6sc5@3ackekqorauo
Whole thread Raw
In response to Re: PQexecPrepared() question  (Igor Korot <ikorot01@gmail.com>)
List pgsql-general
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

--
   _  | Peter J. Holzer    | Story must make more sense than reality.
|_|_) |                    |
| |   | hjp@hjp.at         |    -- Charles Stross, "Creative writing
__/   | http://www.hjp.at/ |       challenge!"

Attachment

pgsql-general by date:

Previous
From: "Peter J. Holzer"
Date:
Subject: Re: Dealing with SeqScans when Time-based Partitions Cut Over
Next
From: "Peter J. Holzer"
Date:
Subject: Re: Dealing with SeqScans when Time-based Partitions Cut Over