Re: JDBC driver, PGSQL 7.3.2 and accents characters

From: Marco Trevisan <trevisan(at)ost(dot)it>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: JDBC driver, PGSQL 7.3.2 and accents characters
Date: 2003-03-22 11:10:02
Message-ID: 3E7C448A.8070605@ost.it
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.
>

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Han 2003-03-23 03:56:11 question about compile environment
Previous Message Patrik Lundgren 2003-03-22 08:36:42 Re: spanish characters in postgres