From: "Jeff Lu" <jklcom@mindspring.com>
Subject: RE: Multibyte examples
Date: Tue, 20 Mar 2001 22:17:39 -0500
Message-ID: <NDBBIHPECLIGKCCLMACACEPMCJAA.jklcom@mindspring.com>
> Please excuse my ignorance in PostgreSQL for I'm new to this.
>
> This is what I got when tried to run mbregress.sh, what am I missing?
>
> destroydb: not found
> destroydb: not found
> /usr/local/pgsql/bin/pg_encoding: not found
> destroydb: not found
> destroydb: not found
[snip]
It is likely your PostgreSQL installation or your personal environment
settings are not correct. Please read the INSTALL doc carefully and
try again.
> I looked in the examples such as
> Big5: src/test/mb/big5.sql
> EUC_CN: src/test/mb/euc_cn.sql
> EUC_TW: src/test/mb/euc_tw.sql
>
>
> Are these files excutable?
No. These are just SQL files. You can execute them like:
psql -e -f src/test/mb/big5.sql your_database_name
> I want to see some examples using C API to
> read/write to database using Big5 encoding. I'm just not sure what to do
> before writing the data to the database. Do I need to do any conversion?
There are C examples somewhere under the source tree.
To use Big5 in frontend side, you just set an environment variable
called "PGCLIENTENCODING" to "Big5". Note that PostgreSQL 7.0.x has
bugs thus it will not work with this feature. Grab
ftp://ftp.sra.co.jp/pub/cmd/postgres/7.0.3/patches/libpq.patch.gz and
apply it. Or you could use 7.1 beta.
--
Tatsuo Ishii