pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bruce Momjian <pgman@candle.pha.pa.us>
To: cch@cc.kmu.edu.tw
Cc: Tatsuo Ishii <t-ishii@sra.co.jp>
Cc: pgsql-hackers@postgresql.org, PostgreSQL-documentation <pgsql-docs@postgresql.org>
Subject: Re: [HACKERS] About PQsetClientEncoding(), "SET NAMES", and "SET CLIENT_ENCODING"
Date: Fri, 29 Dec 2000 14:00:13 -0500 (EST)
Message-ID: <200012291900.OAA16219@candle.pha.pa.us> (raw)
In-Reply-To: <3A49D8C3.5498BA62@cc.kmu.edu.tw>

We have merged README.mb into the official SGML docs, so the file is
gone.  Not sure what setup we have for SGML docs in different languages.

Sorry.


---------------------------------------------------------------------------


Tatsuo Ishii  wrote:

> Here are the patches I promised against PHP
> 3.0.15 or later.
>
> To set the client encoding to BIG5:
>
> pg_setclientencoding($cid, "BIG5");
>
>   ($cid is the connection id)
>
> To get the current client encoding:
>
> pg_clientencoding($cid);
>
> Note that these fucntions are already included in the latest PHP4.

Thank you!
Your README.mb has been translate into Chinese (Big5 encoding) in the
attachement.
Would someone like to review it?
After translating it, I still have one question: (Sorry, I have not read the
source code.)
What is the difference among "libpq  -- PQsetClientEncoding()",
"SQL command  -- SET NAMES", and
"SQL command -- SET CLIENT_ENCODING"?
For example: If we use PHP (>4.0.2),  which way is correct or mostly correct?

1. pg_setclientencoding($cid, "BIG5")
2. pg_exec("SET NAMES 'BIG5'")
3. pg_exec("SET CLIENT_ENCODING TO 'BIG5'")

--
Chih-Chang Hsieh



-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026



view thread (5+ messages)  latest in thread

Message-ID: <200012291900.OAA16219@candle.pha.pa.us>
Permalink:  ../200012291900.OAA16219@candle.pha.pa.us/
Also on:    postgresql.org/message-id/200012291900.OAA16219@candle.pha.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-docs@postgresql.org
  Cc: pgman@candle.pha.pa.us, cch@cc.kmu.edu.tw, t-ishii@sra.co.jp
  Subject: Re: [HACKERS] About PQsetClientEncoding(), "SET NAMES", and "SET CLIENT_ENCODING"
  In-Reply-To: <200012291900.OAA16219@candle.pha.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox