Re: Character encoding problem - Mailing list pgsql-jdbc

From Barry Lind
Subject Re: Character encoding problem
Date
Msg-id 3E4A85F8.3020806@xythos.com
Whole thread Raw
In response to Character encoding problem  (Boris Klug <boris.klug@control.de>)
Responses Re: Character encoding problem  (Boris Klug <boris.klug@control.de>)
List pgsql-jdbc
Boris,

What problems do you have when your database encoding is latin1?  Can
you send a simple test program that demonstrates the problem?  I can
successfully store and retreive latin1 data here on my test system.

thanks,
--Barry

Boris Klug wrote:
> Hello!
>
> we are using PostgreSQL DBs with Java for quite a long time. Now we upgraded
> to PostgreSQL 7.3.1 and now we have a problem:
>
> We have to PostgreSQL dbs on two different servers, both with Debian Linux
> 2.4.18. Java is a SDK 1.4.
>
> I created the dbs using standrd enconding with leads to SQL_ASCII encoding.
> Now I created a table with a varchar field and inserted tet with German
> umlauts:
>     create table umlauttest (txt varchar(50));
>     insert into umlauttest values('üäö ÜÄÖ ß');
>
> using psql I can verify that the umlauts are correctly stored in the db. Using
> pg73b1jdbc2 (build 104) I can retrieve the umlauts on one machine but only
> get questions marks on the other. Why?
> Using pg73rc1jdbc2 (build 106) I get an ArrayOurOfBounce error on both
> machines. Using pg73jdbc2 (build 108) I get the following exception:
> "Invalid character data was found.  This is most likely caused by stored data
> containing characters that are invalid for the character set the database was
> created in.  The most common example of this is storing 8bit data in a
> SQL_ASCII database."
>
> OK, so I created the db using "initdb -E LATIN1" which does not helped. Using
> "initdb -E UNICODE" will give even more problems: I wasnt able to insert
> umlauts using psql...
>
> So I am now totally confused about char encoding in PostgreSQL and in jdbc...
> Can you help?
>
>
>



pgsql-jdbc by date:

Previous
From: Thomas O'Dowd
Date:
Subject: Re: [HACKERS] Wrong charset mappings
Next
From: Barry Lind
Date:
Subject: Re: [HACKERS] Wrong charset mappings