From: | Marko Kreen <marko(at)l-t(dot)ee> |
---|---|
To: | Tony Grant <tony(at)animaproductions(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: JDBC and Accents |
Date: | 2001-04-27 13:24:59 |
Message-ID: | 20010427152459.A30250@l-t.ee |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-jdbc |
On Fri, Apr 27, 2001 at 02:37:48PM +0200, Tony Grant wrote:
> On 27 Apr 2001 14:26:14 +0200, Marko Kreen wrote:
>
> >
> > What is your database encoding?
> >
> > You can insert whatever stuff you want into db and
> > psql displays it fine - it does not care what it is.
> >
> > But JDBC 7.1 does use database encoding for understanding
> > stuff it gets and translating it to Java strings. So if your
> > db encoding is SQL_ASCII but data is LATIN1 you are screwed.
> > Same with data in LATIN1 and db in UNICODE. etc...
>
> How do I set it?
initdb --ecnoding ENC sets the template* encoding, this gets
used when you dont specify the encoding in db creation
time.
CREATE DATABASE xx WITH ECCODING='ENC';
createdb xx --encoding ENC
same thing, sets the new database encoding.
and there is commands
SET CLIENT_ENCODING='ENC';
SET SERVER_ENCODING='ENC';
which set the encoding for one session. SERVER_ENCODING is
r/o though. CLIENT_ENCODING Im not so sure, probably
commands the server to do on-the-fly encoding conversion
for client. I expect this needs correct database encoding...
> Searching docs for "database encoding" gives:
>
> Sorry, but search returned no results.
It _is_ documented somewhere but I cant do much
surfing at the moment coz Iam sitting behind a 80x25 Video
Terminal...
>
> Is this the locale value that can be passed at start up? I will document
> this in my Ultradev - Posgresql HOWTO because it is JDBC related.
Look in docs help for above commands.
--
marko
From | Date | Subject | |
---|---|---|---|
Next Message | Marko Kreen | 2001-04-27 13:32:45 | Re: JDBC and Accents |
Previous Message | Jelle Ouwerkerk | 2001-04-27 13:23:39 | rotating log files |
From | Date | Subject | |
---|---|---|---|
Next Message | Marko Kreen | 2001-04-27 13:32:45 | Re: JDBC and Accents |
Previous Message | Tony Grant | 2001-04-27 13:10:58 | Re: JDBC and Accents |