public inbox for [email protected]  
help / color / mirror / Atom feed
From: Laurenz Albe <[email protected]>
To: Igor Korot <[email protected]>
To: Tom Lane <[email protected]>
Cc: Adrian Klaver <[email protected]>
Cc: David G. Johnston <[email protected]>
Cc: pgsql-generallists.postgresql.org <[email protected]>
Subject: Re: PQexecPrepared() question
Date: Mon, 22 Dec 2025 09:18:57 +0100
Message-ID: <[email protected]> (raw)
In-Reply-To: <CA+FnnTxCCoA+ju+-HAde8t8kmQt6Qm58oP5z2U2eZGHr7qAf6Q@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>
	<CAKFQuwYSM2xMxX+v8LAhJFG3kB1O-VBtV3eo3fj0ag3rGJ=ehQ@mail.gmail.com>
	<CA+FnnTzqQbBMnMyX3fz44tL0bYykDU=qcUpvT=vUy+cp8Q6vfw@mail.gmail.com>
	<[email protected]>
	<[email protected]>
	<CA+FnnTxCCoA+ju+-HAde8t8kmQt6Qm58oP5z2U2eZGHr7qAf6Q@mail.gmail.com>

On Sun, 2025-12-21 at 11:44 -0800, Igor Korot wrote:
> Adding following code:
> 
>         SQLHSTMT stmt;
>         SQLWCHAR value[25];
>         ret = SQLAllocHandle( SQL_HANDLE_STMT, m_hdbc, &stmt );
>         ret = SQLExecDirect( stmt, L"SHOW client_encoding", SQL_NTS );
>         ret = SQLBindCol( stmt, 1, SQL_C_WCHAR, &value, 25, 0 );
>         ret = SQLFetch( stmt );
>         ret = SQLFreeHandle( SQL_HANDLE_STMT, stmt );
> 
> the value of the "value" variable is still "UTF8".

The ODBC driver comes in a "unicode" and an "ANSI" flavor.
If you are using the "unicode" driver, it will always set the
client encoding to UTF8.

Yours,
Laurenz Albe






view thread (10+ messages)

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], [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