Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-jdbc by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group