Re: Client encoding win866.

Поиск
Список
Период
Сортировка
Искать
От
Hiroshi Inoue
Тема
Re: Client encoding win866.
Дата
Msg-id
4DF210D5.2020009@tpf.co.jp
Ответ на
Re: Client encoding win866. (Попов Михаил Юрьевич)
Список
Дерево обсуждения
Client encoding win866. Попов Михаил Юрьевич <Mihail.Popov@galaktika.by>
Re: Client encoding win866. Hiroshi Inoue <inoue@tpf.co.jp>
Re: Client encoding win866. Попов Михаил Юрьевич <Mihail.Popov@galaktika.by>
Re: Client encoding win866. Hiroshi Inoue <inoue@tpf.co.jp>
Re: Client encoding win866. Попов Михаил Юрьевич <Mihail.Popov@galaktika.by>
Re: Client encoding win866. Hiroshi Inoue <inoue@tpf.co.jp>
Re: Client encoding win866. Hiroshi Inoue <inoue@tpf.co.jp>
(2011/06/09 18:34), Попов Михаил Юрьевич wrote:
>
>
>>> 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 \"WIN866\";",SQL_NTS);
>>> Then after SQLPrepare, SQLBindParameter and after SQLExecute I get an error:
>>> 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 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 automatically selected when a connection to the server is made. (This can subsequently be overridden using any of the other methods mentioned above.)
>
> Using the configuration variable client_encoding. If the client_encoding variable is set, that client encoding is automatically selected when a connection 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='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 each 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

В списке pgsql-odbc по дате отправления
От: Попов Михаил Юрьевич
Дата:
Сообщение: Re: Client encoding win866.
От: Ramesh Reddy
Дата:
Сообщение: Fetch Sizes and Blocks
FAQ