Re: [ODBC] pgAdmin2 UTF-8 support

Поиск
Список
Период
Сортировка
Искать

Re: [ODBC] pgAdmin2 UTF-8 support

От:
Dave Page <dpage@vale-housing.co.uk>
Дата:


> -----Original Message-----
> From: Jean-Michel POURE [mailto:jm.poure@freesurf.fr] 
> Sent: 25 February 2002 08:39
> To: Dave Page
> Cc: pgadmin-hackers@postgresql.org
> Subject: Re: [pgadmin-hackers] [ODBC] pgAdmin2 UTF-8 support
> 
> 
> Le Lundi 25 Février 2002 09:29, Dave Page a écrit :
> > SET CLIENT_ENCODING Latin1;
> > INSERT INTO table_foo (field_bar) VALUES ('é'); SELECT 
> field_bar FROM 
> > table_foo WHERE field_bar='é';
> 
> In case of an UTF-8 database,
> - schema queries should always be sent in Latin1.
> - SQL highlightbox should allow to choose client encoding on 
> the fly in a 
> combo.
> 
> How do we query current client encoding?

SHOW CLIENT_ENCODING;

However the result is returned as a NOTICE message from the backend so we'd
have to do it via low level ODBC API calls (checkout how EXPLAIN works for
an example).

/D
FAQ