Re: Very strange Error in Updates

Поиск
Список
Период
Сортировка
От Oliver Jowett
Тема Re: Very strange Error in Updates
Дата
Msg-id 40F71217.8080304@opencloud.com
обсуждение исходный текст
Ответ на Re: Very strange Error in Updates  ("Dario V. Fassi" <software@sistemat.com.ar>)
Ответы Re: Very strange Error in Updates  (Oliver Jowett <oliver@opencloud.com>)
Re: Very strange Error in Updates  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-jdbc
Dario V. Fassi wrote:
>
> My problem it's that the data is just inside the postgresql server (with
> SQL_ASCII encoding), inserted by Win32/ODBC clients.
>
> Now from JDBC I can't handle any row with any field that has one o more
> 8 bits characters.
> At same time , Win32/ODBC programs continue to use it without any problem.
> This situation let me in a hard to explain situation.

The problem, as I understand it from Tom's explanation, is that
SQL_ASCII only works if everyone is using the same client_encoding; the
server has no knowledge of the real underlying encoding of the data so
can't do conversions.

JDBC always uses a client_encoding of UNICODE. I don't know what ODBC
does, but apparently it's not using UNICODE.

Perhaps one option is to set the database encoding to UNICODE, and
either get the ODBC driver to issue an appropriate "SET client_encoding"
on connection setup (I don't know if ODBC lets you do this) or set the
default client_encoding in postgresql.conf to whatever is appropriate
for ODBC clients?

-O

В списке pgsql-jdbc по дате отправления:

Предыдущее
От: tgutierrez@unipamplona.edu.co
Дата:
Сообщение: problema con el backend
Следующее
От: Oliver Jowett
Дата:
Сообщение: Re: Very strange Error in Updates