Re: How to insert Chinese (big5) through JDBC? - Mailing list pgsql-jdbc

From Eric Tan
Subject Re: How to insert Chinese (big5) through JDBC?
Date
Msg-id 20030731095312.84455.qmail@web13006.mail.yahoo.com
Whole thread Raw
In response to Re: How to insert Chinese (big5) through JDBC?  (Kris Jurka <books@ejurka.com>)
Responses Re: How to insert Chinese (big5) through JDBC?
List pgsql-jdbc
The command only work in command prompt - putty":
ALTER DATABASE "CA_care" SET client_enconding TO 'big5';
 
But it fail when inserting from jsp & VB.
I have to run this code in all program which may access database.
pgsql.execute("set client_encoding to 'Big5';");
 
Any other solution?

Kris Jurka <books@ejurka.com> wrote:


On Thu, 31 Jul 2003, [big5] Eric Tan wrote:

> Hi,
> I can now insert Chinese!!
> I'm now using EUC_TW as the database encoding.
> However, the default client encoding is now EUC_TW. (that's why I
> cannot insert Chinese). I have to exe "set client_encoding to 'Big5';"
> when inserting and selecting.
>
> Can I set Big5 as the default client_encoding ?
>

You can make it the default for the database or for the user you are
connecting as. Try running

ALTER DATABASE SET client_enconding TO big5;

or

ALTER USER SET client_encoding TO big5;

Kris Jurka



---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match

最新鈴聲推介:十面埋伏,多謝失戀,心淡...
http://ringtone.yahoo.com.hk

pgsql-jdbc by date:

Previous
From: Kris Jurka
Date:
Subject: Re: How to insert Chinese (big5) through JDBC?
Next
From: Kris Jurka
Date:
Subject: Re: How to insert Chinese (big5) through JDBC?