From: | Markus Schaber <schabi(at)logix-tt(dot)com> |
---|---|
To: | stafford(at)marine(dot)rutgers(dot)edu |
Cc: | pgsql-jdbc(at)postgresql(dot)org |
Subject: | Re: Is UTF-8 required for PostgreSQL JDBC? |
Date: | 2006-11-21 13:07:37 |
Message-ID: | 4562FA19.1050503@logix-tt.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
Hi, Bill,
Wm.A.Stafford wrote:
> When installing PostgreSQL two weeks ago I thought I read that the
> encoding for a DB that will be acccessed via JDBC must be UTF-8. Is
> this correct? I can not find the docs page where I saw this and I'm
> beginning to wonder if I imagined it.
That's wrong, the database can be in any encoding you like.
The connection actually is encoded in UTF-8. PostgreSQL converts all
data between UTF-8 and the actual database encoding, and the JDBC triver
converts between UTF-8 and the JVM-internal unicode representation
(which is likely to be an UTF-16-derivate, as that's closest to what's
visible to the Java code).
Executing a "SET client_encoding TO foobar" through the JDBC driver may
break things for that one connection.
HTH,
Markus
--
Markus Schaber | Logical Tracking&Tracing International AG
Dipl. Inf. | Software Development GIS
Fight against software patents in Europe! www.ffii.org
www.nosoftwarepatents.org
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Schmidt | 2006-11-21 17:52:19 | Re: Hello World |
Previous Message | Albert Cardona | 2006-11-21 12:50:13 | Re: Hello World |