Client encoding win866.

--_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

<html xmlns:v=3D"urn:schemas-microsoft-com:vml" xmlns:o=3D"urn:schemas-micr=
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"><head><meta http-equiv=3DContent-Type content=
=3D"text/html; charset=3Dkoi8-r"><meta name=3DGenerator content=3D"Microsof=
t Word 12 (filtered medium)"><style><!--
/* Font Definitions */
[at] font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
[at] font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri","sans-serif";
color:windowtext;}
..MsoChpDefault
{mso-style-type:export-only;}
[at] page WordSection1
{size:612.0pt 792.0pt;
margin:2.0cm 42.5pt 2.0cm 3.0cm;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext=3D"edit" spidmax=3D"1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext=3D"edit">
<o:idmap v:ext=3D"edit" data=3D"1" />
</o:shapelayout></xml><![endif]--></head><body lang=3DRU link=3Dblue vlink=
=3Dpurple><div class=3DWordSection1><p class=3DMsoNormal><span lang=3DEN-US=
>Hi.<o:p></o:p></span></p><p class=3DMsoNormal><span lang=3DEN-US>Can you p=
lease tell me how to change client encoding in ODBC?<o:p></o:p></span></p><=
p class=3DMsoNormal><span lang=3DEN-US>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.<o:p></o:p></span=
></p><p class=3DMsoNormal><span lang=3DEN-US><o:p> </o:p></span></p><p=
class=3DMsoNormal><span lang=3DEN-US>PS: The database I have with encoding=
win866. =9AWindows 7. PostgreSQL 9.0.4. psqlodbc-09.00.0200.<o:p></o:p></s=
pan></p><div style=3D'mso-element:para-border-div;border:none;border-bottom=
:solid windowtext 1.0pt;padding:0cm 0cm 1.0pt 0cm'><p class=3DMsoNormal sty=
le=3D'border:none;padding:0cm'><span lang=3DEN-US><o:p> </o:p></span><=
/p></div><p class=3DMsoNormal>Mihail Popo<span lang=3DEN-US>v.<o:p></o:p></=
span></p></div></body></html>=

--_000_27EFDA7DA70C1E409421B31ECAA8C9D31DD83EDF90topmail6_--
Mihail.Popov [ Di, 07 Juni 2011 13:04 ] [ ID #2060601 ]

Re: Client encoding win866.

(2011/06/07 20:04), =F0=CF=D0=CF=D7 =ED=C9=C8=C1=C9=CC =E0=D2=D8=C5=D7=C9=
=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.



--
Sent via pgsql-odbc mailing list (pgsql-odbc [at] postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-odbc
Hiroshi Inoue [ Di, 07 Juni 2011 16:39 ] [ ID #2060602 ]

Re: Client encoding win866.

>> 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=
:
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.

--
Sent via pgsql-odbc mailing list (pgsql-odbc [at] postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-odbc
Mihail.Popov [ Mi, 08 Juni 2011 13:52 ] [ ID #2060719 ]

Re: Client encoding win866.

(2011/06/08 20:52), =F0=CF=D0=CF=D7 =ED=C9=C8=C1=C9=CC =E0=D2=D8=C5=D7=C9=
=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



--
Sent via pgsql-odbc mailing list (pgsql-odbc [at] postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-odbc
Hiroshi Inoue [ Mi, 08 Juni 2011 15:49 ] [ ID #2060720 ]

Re: Client encoding win866.

(2011/06/08 20:52), =F0=CF=D0=CF=D7 =ED=C9=C8=C1=C9=CC =E0=D2=D8=C5=D7=C9=
=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

--
Sent via pgsql-odbc mailing list (pgsql-odbc [at] postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-odbc
Hiroshi Inoue [ Do, 09 Juni 2011 11:29 ] [ ID #2060798 ]

Re: Client encoding win866.

>> 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.)

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?

--
Sent via pgsql-odbc mailing list (pgsql-odbc [at] postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-odbc
Mihail.Popov [ Do, 09 Juni 2011 11:34 ] [ ID #2060799 ]

Re: Client encoding win866.

(2011/06/09 18:34), =F0=CF=D0=CF=D7 =ED=C9=C8=C1=C9=CC =E0=D2=D8=C5=D7=C9=
=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


--
Sent via pgsql-odbc mailing list (pgsql-odbc [at] postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-odbc
Hiroshi Inoue [ Fr, 10 Juni 2011 14:40 ] [ ID #2060859 ]
Datenbanken » gmane.comp.db.postgresql.odbc » Client encoding win866.

Vorheriges Thema: Fetch Sizes and Blocks
Nächstes Thema: Logging attempt to connect with odbc