Re: invalid byte sequence ?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: invalid byte sequence ?
Дата
Msg-id 25374.1156373520@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: invalid byte sequence ?  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: invalid byte sequence ?  (Martijn van Oosterhout <kleptog@svana.org>)
Re: invalid byte sequence ?  (Peter Eisentraut <peter_e@gmx.net>)
Список pgsql-general
I wrote:
> We've known about this and related issues with gettext for some time,
> but a bulletproof solution isn't clear.  For the moment all you can
> do is be real careful about making your locale settings match up.

I forgot to mention that it works fine if the server is told the client
encoding actually being used:

postgres=# \encoding iso8859-1
postgres=# \l
        Liste der Datenbanken
    Name    | Eigent�mer | Kodierung
------------+------------+-----------
 postgres   | tgl        | UTF8
 regression | tgl        | SQL_ASCII
 template0  | tgl        | UTF8
 template1  | tgl        | UTF8
(4 Zeilen)

postgres=# \d
Keine Relationen gefunden
postgres=#

A possible solution therefore is to have psql or libpq drive the
client_encoding off the client's locale environment instead of letting
it default to equal the server_encoding.  But I'm not sure what
downsides that would have, and in any case it's not entirely clear that
we can always derive the correct Postgres encoding name from the
system's locale info.

            regards, tom lane

В списке pgsql-general по дате отправления:

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: invalid byte sequence ?
Следующее
От: Bob Pawley
Дата:
Сообщение: Re: Inserting Data