Client encoding win866.

Client encoding win866.

am 07.06.2011 13:04:25 von Mihail.Popov

--_000_27EFDA7DA70C1E409421B31ECAA8C9D31DD83EDF90topmail6_
Content-Type: text/plain; charset="koi8-r"
Content-Transfer-Encoding: quoted-printable

Hi.
Can you please tell me how to change client encoding in ODBC?
I tried after a connection to execute SQLExecDirect (stmthp, "set client_en=
coding to \" WIN866 \ ";", SQL_NTS) , but the encoding is still a win1251.

PS: The database I have with encoding win866. Windows 7. PostgreSQL 9.0.4.=
psqlodbc-09.00.0200.

Mihail Popov.

--_000_27EFDA7DA70C1E409421B31ECAA8C9D31DD83EDF90topmail6_
Content-Type: text/html; charset="koi8-r"
Content-Transfer-Encoding: quoted-printable

osoft-com:office:office" xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml" xmlns=3D"http:=
//www.w3.org/TR/REC-html40"> =3D"text/html; charset=3Dkoi8-r"> t Word 12 (filtered medium)"> =3Dpurple>

>Hi.

Can you p=
lease tell me how to change client encoding in ODBC?

<=
p class=3DMsoNormal>I tried after a connection to execut=
e SQLExecDirect (stmthp, "set client_encoding to \" WIN866 \ &quo=
t;;", SQL_NTS) , but the encoding is still a win1251. >

 

class=3DMsoNormal>PS: The database I have with encoding=
win866. =9AWindows 7. PostgreSQL 9.0.4. psqlodbc-09.00.0200. pan>

:solid windowtext 1.0pt;padding:0cm 0cm 1.0pt 0cm'>

le=3D'border:none;padding:0cm'> <=
/p>

Mihail Popov. span>

=

--_000_27EFDA7DA70C1E409421B31ECAA8C9D31DD83EDF90topmail6_--

Re: Client encoding win866.

am 07.06.2011 16:39:29 von Hiroshi Inoue

(2011/06/07 20:04), ðÏÐÏ=D7 íÉÈÁÉÌ àÒØÅ×É=
=DE wrote:
> Hi.
>
> Can you please tell me how to change client encoding in ODBC?
>
> I tried after a connection to execute SQLExecDirect (stmthp, "set
> client_encoding to \" WIN866 \ ";", SQL_NTS) , but the encoding is stil=
l
> a win1251.

How do you confirm the client_encoding?

regards,
Hiroshi Inoue

> PS: The database I have with encoding win866. Windows 7. PostgreSQL
> 9.0.4. psqlodbc-09.00.0200.
>
> Mihail Popov.



--=20
Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-odbc

Re: Client encoding win866.

am 08.06.2011 13:52:46 von Mihail.Popov

>> Hi.
>>
>> Can you please tell me how to change client encoding in ODBC?
>>
>> I tried after a connection to execute SQLExecDirect (stmthp, "set
>> client_encoding to \" WIN866 \ ";", SQL_NTS) , but the encoding is still
>> a win1251.

> How do you confirm the client_encoding?

Few details...
I create connection and before all the bindings of parameters and columns, =
and before SQLPrepare I do SQLExecDirect(stmthp,"set client_encoding to \"W=
IN866\";",SQL_NTS);
Then after SQLPrepare, SQLBindParameter and after SQLExecute I get an error=
:=20
Error code 22P05 with message ERROR: character 0x83 of encoding "WIN1251" h=
as no equivalent in "MULE_INTERNAL";

In this example, the function I pass the 'select * from "Table"'

regards, Mihail Popov.

--=20
Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-odbc

Re: Client encoding win866.

am 08.06.2011 15:49:41 von Hiroshi Inoue

(2011/06/08 20:52), ðÏÐÏ=D7 íÉÈÁÉÌ àÒØÅ×É=
=DE wrote:
>
>>> Hi.
>>>
>>> Can you please tell me how to change client encoding in ODBC?
>>>
>>> I tried after a connection to execute SQLExecDirect (stmthp, "set
>>> client_encoding to \" WIN866 \ ";", SQL_NTS) , but the encoding is st=
ill
>>> a win1251.
>
>> How do you confirm the client_encoding?
>
> Few details...
> I create connection and before all the bindings of parameters and colum=
ns, and before SQLPrepare I do SQLExecDirect(stmthp,"set client_encoding =
to \"WIN866\";",SQL_NTS);
> Then after SQLPrepare, SQLBindParameter and after SQLExecute I get an e=
rror:
> Error code 22P05 with message ERROR: character 0x83 of encoding "WIN125=
1" has no equivalent in "MULE_INTERNAL";
>
> In this example, the function I pass the 'select * from "Table"'

What will happen when you don't call *set client_encoding to ...*?

regards,
Hiroshi Inoue



--=20
Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-odbc

Re: Client encoding win866.

am 09.06.2011 11:29:41 von Hiroshi Inoue

(2011/06/08 20:52), ðÏÐÏ=D7 íÉÈÁÉÌ àÒØÅ×É=
=DE wrote:
>
>>> Hi.
>>>
>>> Can you please tell me how to change client encoding in ODBC?
>>>
>>> I tried after a connection to execute SQLExecDirect (stmthp, "set
>>> client_encoding to \" WIN866 \ ";", SQL_NTS) , but the encoding is st=
ill
>>> a win1251.
>
>> How do you confirm the client_encoding?
>
> Few details...
> I create connection and before all the bindings of parameters and colum=
ns, and before SQLPrepare I do SQLExecDirect(stmthp,"set client_encoding =
to \"WIN866\";",SQL_NTS);
> Then after SQLPrepare, SQLBindParameter and after SQLExecute I get an e=
rror:
> Error code 22P05 with message ERROR: character 0x83 of encoding "WIN125=
1" has no equivalent in "MULE_INTERNAL";

Please confirm the database encoding.
Isn't it "WIN1251" not "WIN866"?

regards,
Hiroshi Inoue

--=20
Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-odbc

Re: Client encoding win866.

am 09.06.2011 11:34:46 von Mihail.Popov

>> Few details...
>> I create connection and before all the bindings of parameters and column=
s, and before SQLPrepare I do SQLExecDirect(stmthp,"set client_encoding to =
\"WIN866\";",SQL_NTS);
>> Then after SQLPrepare, SQLBindParameter and after SQLExecute I get an er=
ror:
>> Error code 22P05 with message ERROR: character 0x83 of encoding "WIN1251=
" has no equivalent in "MULE_INTERNAL";
>>
>> In this example, the function I pass the 'select * from "Table"'

>What will happen when you don't call *set client_encoding to ...*?

Yes, I understood and found a bug in my code. And now schema by using "set =
client_encoding to \"WIN866\";" worked correctly. Thanks.

But while I was searching for a solution, I found the documentation and tri=
ed it through a variable PGCLIENTENCODING change the encoding.
http://www.postgresql.org/docs/8.1/static/multibyte.html
---
Using PGCLIENTENCODING. If the environment variable PGCLIENTENCODING is def=
ined in the client's environment, that client encoding is automatically sel=
ected when a connection to the server is made. (This can subsequently be ov=
erridden using any of the other methods mentioned above.)=20

Using the configuration variable client_encoding. If the client_encoding va=
riable is set, that client encoding is automatically selected when a connec=
tion to the server is made. (This can subsequently be overridden using any =
of the other methods mentioned above.)
---
I set environment variable at 'WIN866', as well set the database properties=
"ALTER DATABASE "DD866" SET client_encoding=3D'WIN866'". But it did not wo=
rk. And without *set client_encoding to ...* don't work.
This mechanism would be more optimal for my project, because now, for each =
cursor must run the command *set client_encoding to ...*. Or is this anothe=
r question?

--=20
Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-odbc

Re: Client encoding win866.

am 10.06.2011 14:40:53 von Hiroshi Inoue

(2011/06/09 18:34), ðÏÐÏ=D7 íÉÈÁÉÌ àÒØÅ×É=
=DE wrote:
>
>
>>> Few details...
>>> I create connection and before all the bindings of parameters and col=
umns, and before SQLPrepare I do SQLExecDirect(stmthp,"set client_encodin=
g to \"WIN866\";",SQL_NTS);
>>> Then after SQLPrepare, SQLBindParameter and after SQLExecute I get an=
error:
>>> Error code 22P05 with message ERROR: character 0x83 of encoding "WIN1=
251" has no equivalent in "MULE_INTERNAL";
>>>
>>> In this example, the function I pass the 'select * from "Table"'
>
>> What will happen when you don't call *set client_encoding to ...*?
>
> Yes, I understood and found a bug in my code. And now schema by using "=
set client_encoding to \"WIN866\";" worked correctly. Thanks.
>
> But while I was searching for a solution, I found the documentation and=
tried it through a variable PGCLIENTENCODING change the encoding.
> http://www.postgresql.org/docs/8.1/static/multibyte.html
> ---
> Using PGCLIENTENCODING. If the environment variable PGCLIENTENCODING is=
defined in the client's environment, that client encoding is automatical=
ly selected when a connection to the server is made. (This can subsequent=
ly be overridden using any of the other methods mentioned above.)
>
> Using the configuration variable client_encoding. If the client_encodin=
g variable is set, that client encoding is automatically selected when a =
connection to the server is made. (This can subsequently be overridden us=
ing any of the other methods mentioned above.)
> ---
> I set environment variable at 'WIN866', as well set the database proper=
ties "ALTER DATABASE "DD866" SET client_encoding=3D'WIN866'". But it did =
not work. And without *set client_encoding to ...* don't work.
> This mechanism would be more optimal for my project, because now, for e=
ach cursor must run the command *set client_encoding to ...*. Or is this =
another question?

If you connect via DSN, please look at the page
http://www.ne.jp/asahi/inocchichichi/entrance/psqlodbc/index .html .

regards,
Hiroshi Inoue


--=20
Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-odbc