Re: PQexecPrepared() question

From: "Peter J(dot) Holzer" <hjp-pgsql(at)hjp(dot)at>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: PQexecPrepared() question
Date: 2025-12-21 10:10:58
Message-ID: exzgttcvkt27rlddmioxcrxymzz4ks4lefwltwpl4d7sal6sc5@3ackekqorauo
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: 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(at)hjp(dot)at | -- Charles Stross, "Creative writing
__/ | http://www.hjp.at/ | challenge!"

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Peter J. Holzer 2025-12-21 10:22:44 Re: Dealing with SeqScans when Time-based Partitions Cut Over
Previous Message Peter J. Holzer 2025-12-21 09:49:08 Re: Dealing with SeqScans when Time-based Partitions Cut Over