Re: Urgent Question on Postgresql

From: Tatsuo Ishii <t-ishii(at)sra(dot)co(dot)jp>
To: lfwu(at)yahoo(dot)com
Cc: pgsql-hackers(at)postgresql(dot)org, pgsql-general(at)postgresql(dot)org
Subject: Re: Urgent Question on Postgresql
Date: 2001-03-18 14:10:27
Message-ID: 20010318231027E.t-ishii@sra.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

From: Bryan Wu <lfwu(at)yahoo(dot)com>
Subject: Urgent Question on Postgresql
Date: Sun, 18 Mar 2001 04:39:36 -0800 (PST)
Message-ID: <20010318123936(dot)79559(dot)qmail(at)web10003(dot)mail(dot)yahoo(dot)com>

> Hi tatsuo Ishii,
>
> I learn from postgresql mailing list that you are
> concerning the problem the UTF8 support in Postgresql.
> Currently I want to choose a database to store chinese
> (BIG5 and GB) information. Could you tell me if the
> Postgresql can store information in UTF-8 format. I
> think it is better for me to use UTF-8 since I need to
> handle the Big5 and GB at the same time.

Yes.

> I find very little information on how to configure the
> postgresql to use default encoding UTF-8 when storing
> data. Do you have any idea?

Enable the multibyte capability(configure --enable-multibyte) and
do createdb -E UNICODE.

> And do you know if postgresql has any import tools so
> I can import some chinese information directly to the
> tables?

PostgreSQL 7.1 will be able to do an automatic conversion between
UTF-8 and Big5 or EUC-CN(GB). Here is a sample:

createdb -E UNICODE unicode
psql unicode
\encoding BIG5
insert into big_table values('some big5 data');
\encoding EUC_CN
insert into gb_table values('some EUC_CN data');
:
:
--
Tatsuo Ishii

Browse pgsql-general by date

  From Date Subject
Next Message Peter Morgan 2001-03-18 15:56:34 Migrating from MS SQL 7
Previous Message Matthew Brown 2001-03-18 10:49:48 Question about databases in general

Browse pgsql-hackers by date

  From Date Subject
Next Message Alexander Klimov 2001-03-18 16:40:32 Re: problems with startup script on upgrade
Previous Message Tom Lane 2001-03-18 06:22:03 Re: Stuck spins in current