Re: How to insert Chinese (big5) through JDBC?

From: Eric Tan <neltan2002(at)yahoo(dot)com(dot)hk>
To: Kris Jurka <books(at)ejurka(dot)com>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: How to insert Chinese (big5) through JDBC?
Date: 2003-07-31 09:53:12
Message-ID: 20030731095312.84455.qmail@web13006.mail.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)ejurka(dot)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

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Kris Jurka 2003-07-31 10:39:19 Re: How to insert Chinese (big5) through JDBC?
Previous Message Kris Jurka 2003-07-31 08:10:59 Re: How to insert Chinese (big5) through JDBC?