Problem with accessing Russian UTF database

From: "Ronald Vyhmeister" <rvyhmeister(at)gmail(dot)com>
To: <pgsql-jdbc(at)postgresql(dot)org>
Subject: Problem with accessing Russian UTF database
Date: 2008-11-25 21:26:57
Message-ID: E16B7EDDD7DF4499B2114368768C96C6@peregrino
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

I'm having real trouble with the jdbc driver for postgres... I just
installed the latest version...

I have a database, UTF8 encoded, which has data in Russian. I can view it
beautifully using PGAdmin3 or any other ODBC connection.

This is the connection string I'm using (from Tomcat 5.5)

String URLdb =
"jdbc:postgresql://127.0.0.1:5432/oldzautest?user=noe&password=genesis&charS
et=UNICODE";

However, when I try to retrieve data from it, I get this garbage, where the
questionmarks are the Russian text...

<data>
<db_content>
<row>
<contents content = "1" />
<contents content = "1" />
<contents content = "?????" />
<contents content = "????????" />
<contents content = "?????????" />
<contents content = "1965-03-10" />
<contents content = "1" />
</row>
</db_content>
</data>

Interestingly enough, if I send Russian data to the database through the
jdbc driver, it writes it into the DB as a bunch of garbage... but retrieves
it beautifully as Russian text...

I've set the client_encoding to UTF8 on the server... What am I doing
wrong? What am I missing? I'd be thrilled to interact privately with
someone who has solved what for now is a mystery to me.

Thanks!

Ron

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Oliver Jowett 2008-11-25 23:09:54 Re: Problem with accessing Russian UTF database
Previous Message Reuben Cummings 2008-11-23 02:11:42 Re: neooffice form problem with numerics