Обсуждение: JDBC CharSet with SQL_ASCII

Поиск
Список
Период
Сортировка

JDBC CharSet with SQL_ASCII

От
Mirco Attocchi
Дата:
Hi All,
I'm newest to this list (sorry for my bad english).
I've a question about charset with jdbc.
I've verified that my customer postgresql database is configured in
SQL_ASCII but when I read data I receive strange chars in some fields.

Do you know how I can determinate the right character set?

PostgreSQL version: 8.3.7
JDBC driver version: 8.4-701.jdbc4

Thank you all

--
Mirco Attocchi

Re: JDBC CharSet with SQL_ASCII

От
Oliver Jowett
Дата:
Mirco Attocchi wrote:
> Hi All,
> I'm newest to this list (sorry for my bad english).
> I've a question about charset with jdbc.
> I've verified that my customer postgresql database is configured in
> SQL_ASCII but when I read data I receive strange chars in some fields.
>
> Do you know how I can determinate the right character set?

Well, the problem with SQL_ASCII is exactly that - there is no
information about what encoding should be used to interpret the data.
You will have to inspect the data stored in the database by hand and
work out what encoding it is actually using. Then you should probably
convert the database to use UNICODE or another appropriate encoding.

-O