Re: Encoding Problem

Поиск
Список
Период
Сортировка
От Kris Jurka
Тема Re: Encoding Problem
Дата
Msg-id Pine.BSO.4.56.0501121639220.1099@leary.csoft.net
обсуждение исходный текст
Ответ на Encoding Problem  (Jerome Colombie <jcolombie@gmx.ch>)
Список pgsql-jdbc

On Wed, 12 Jan 2005, Jerome Colombie wrote:

> I'm using Postgresql since the first 8.0 version (Windows2000) and it
> gets better with every new version. But one problem remains with the
> jdbc driver: The encoding of umlaute is still wrong. This problem occurs
> also in all pgAdmin III versions. The psql client on the other hand
> works fine. I tried different server encodings like sql_ascii or latin1
> but I always get these strange characters in pgAdmin III and with jdbc.

Note that pgadmin and jdbc are completely separate, so I can only speak
for the java side of things.  For the pg jdbc driver you cannot use a
database with sql_ascii encoding.  You must use a real encoding, latin1
should be fine.

> I also tried to specify the charSet property with the connection string
> in jdbc but that didn't help.

If you read the documentation to find the charSet property you should have
also seen the note that said this is completely ignored for server
versions >= 7.3.

> Does anyone know how I can get the correct strings with umlaut (e.g.
> ä,ö,ü) in java? I thought this problem would be solved in the newer
> versions, but even in rc2 the problem still exists.
>

I have no reason to believe there is a problem with the server/jdbc
encoding handling.  I would suspect the problem is related to how you are
trying to enter/display these values.  If you can reproduce this problem
with a standalone Java program that runs against a non sql-ascii database
and does direct string comparisons (doesn't rely on things like
System.out.println), then please post such a program here.

Kris Jurka

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

Предыдущее
От: Jerome Colombie
Дата:
Сообщение: Encoding Problem
Следующее
От: Oliver Jowett
Дата:
Сообщение: Re: Encoding Problem