Re: JDBC driver, PGSQL 7.3.2 and accents characters - Mailing list pgsql-jdbc

From Marco Trevisan
Subject Re: JDBC driver, PGSQL 7.3.2 and accents characters
Date
Msg-id 3E7C448A.8070605@ost.it
Whole thread Raw
In response to JDBC driver, PGSQL 7.3.2 and accents characters  (Davide Romanini <romaz@libero.it>)
List pgsql-jdbc
Hello,

I've been testing the 7.3 version of the dbms and jdbc driver fo more
than one month, the application is a webapp under Tomcat.
Basically we had problems in migrating from 7.2 databases since we used
MULE_INTERNAL, which seems to be no more supported by the 7.3 JDBC driver.
After some work in trying to solve the poblem, the best solution I found
was to change our practice: we now dynamically force the HTML encoding
to be the same of the DBMS' one.
So, if I 'createdb -E UNICODE', my html tags will specify
"charset=UTF-8" and all browsers switch to Unicode automatically. This
is easy to obtain on server-side, i.e. storing the encoding in a
properties file, and should work well: hypotetical users in different
countries should see exactly the same strings and insert strings using
always the same encoding.

Porting databases was more problematic: I was able to port existing
MULE_INTERNAL databases to new UNICODE ones thanks to our custom db
porting tool, passing through another DBMS, since pg_dump and pg_restore
between two differently encoded databases did not work.
[OT for jdbc] Is there any way to do such porting using
postgreSQL-related tools?

Bye
  Marco

Barry Lind wrote:

> Java uses UCS2 as its internal character set.  So jdbc must do a
> character set translation for all string data.  In psql (and probably
> odbc), by default no translation is needed.
>


pgsql-jdbc by date:

Previous
From: "Patrik Lundgren"
Date:
Subject: Re: spanish characters in postgres
Next
From: "Han"
Date:
Subject: question about compile environment