public inbox for [email protected]  
help / color / mirror / Atom feed
From: Peter J. Holzer <[email protected]>
To: [email protected]
Subject: Re: PQexecPrepared() question
Date: Sun, 21 Dec 2025 11:10:58 +0100
Message-ID: <exzgttcvkt27rlddmioxcrxymzz4ks4lefwltwpl4d7sal6sc5@3ackekqorauo> (raw)
In-Reply-To: <CA+FnnTwZUo-ZRZ4if_ngXXkYgtOCsmMp1uFpsMFkG5AOmRxX4Q@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>
	<CAKFQuwZaf2quGaqsGAj4+rVVCebOwU3JjbMUJPxxj6NeF_O_gA@mail.gmail.com>
	<CA+FnnTwZUo-ZRZ4if_ngXXkYgtOCsmMp1uFpsMFkG5AOmRxX4Q@mail.gmail.com>

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.
|_|_) |                    |
| |   | [email protected]         |    -- Charles Stross, "Creative writing
__/   | http://www.hjp.at/ |       challenge!"


Attachments:

  [application/pgp-signature] signature.asc (833B, 2-signature.asc)
  download

view thread (10+ 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]
  Subject: Re: PQexecPrepared() question
  In-Reply-To: <exzgttcvkt27rlddmioxcrxymzz4ks4lefwltwpl4d7sal6sc5@3ackekqorauo>

* 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