From: | Greg Stark <stark(at)enterprisedb(dot)com> |
---|---|
To: | Alvaro Herrera <alvherre(at)commandprompt(dot)com> |
Cc: | Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Determining client_encoding from client locale |
Date: | 2009-06-17 22:32:40 |
Message-ID: | 4136ffa0906171532j141c4031w8f67874bd06e97db@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Wed, Jun 17, 2009 at 4:54 PM, Alvaro
Herrera<alvherre(at)commandprompt(dot)com> wrote:
> Heikki Linnakangas wrote:
>> We currently require that you set client_encoding correctly, or you get
>> garbage in psql and any other tool using libpq. How about setting
>> client_encoding automatically to match the client's locale? We have
>> pg_get_encoding_from_locale() function that we can use to extract the
>> encoding from LC_CTYPE. We could call that in libpq.
>
> +1
I wonder if isatty() is true and we have terminfo information if
there's a terminfo capability to query the terminal for the correct
encoding.
But yeah, +1 to automatically using the user's current encoding from LC_CTYPE.
--
Gregory Stark
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2009-06-17 22:50:30 | Re: [HACKERS] Cannot use all four trigger events at once |
Previous Message | Greg Stark | 2009-06-17 22:26:00 | Re: Named transaction |