Re: Inserting greek letters

From: Keary Suska <hierophant(at)pcisys(dot)net>
To: Postgres General <pgsql-general(at)postgresql(dot)org>
Subject: Re: Inserting greek letters
Date: 2004-11-26 20:58:06
Message-ID: BDCCE6EE.177A7%hierophant@pcisys.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

on 11/26/04 8:16 AM, awitney(at)sghms(dot)ac(dot)uk purportedly said:

>> As for PHP, you need to have the browser and PHP agree on what
>> character set they're going to use. Then you set the client encoding
>> appropriately and PostgreSQL will make sure you get the information you
>> expect.
>
> Im not sure, where do I set the client encoding?

AFAIK, you can't and/or don't need to set character encoding. The issues
would be display and data submission. Your best bet for display is to set
the "default_charset" directive, so PHP will always tell the browser the
correct character set to use. PHP shouldn't care about form data content,
and should handle data literally--i.e. decode it into an octet stream. You
may, however, need to call pg_set_client_encoding() (or set the appropriate
environment variable, as the case may be), to ensure that PHP talks to PG
properly. This might mean that all queries must be properly encoded (i.e.
including keywords), and there may be implications here as well. I am not
sure how PG handles commands vs data.

Best,

Keary Suska
Esoteritech, Inc.
"Demystifying technology for your home or business"

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2004-11-26 21:38:52 Re: pg_dump and languages
Previous Message Glen Eustace 2004-11-26 20:43:43 Problems setting up slony-1