Re: encoding of PostgreSQL messages

Поиск
Список
Период
Сортировка
От Karsten Hilbert
Тема Re: encoding of PostgreSQL messages
Дата
Msg-id 20081231094655.GA3599@merkur.hilbert.loc
обсуждение исходный текст
Ответ на Re: encoding of PostgreSQL messages  (Alvaro Herrera <alvherre@commandprompt.com>)
Ответы Re: encoding of PostgreSQL messages
Список pgsql-general
On Mon, Dec 29, 2008 at 09:07:14AM -0300, Alvaro Herrera wrote:

> > That would not quite be enough -- I am talking about
> > messages reported *during* auth, say
> >
> >     FATAL: password authentication failed for user "postgres"
> >
> > or
> >
> >     fe_sendauth: no password supplied
> >
> > both of which, in other locales, may contain non-ASCII characters.
>
> Those are sent in the server encoding IIRC (which admittedly you don't
> have a way to know, at that point.)
>
> And I'm now wondering if we should delay initializing the translation
> stuff until after client_encoding has been reported.

Or else

- just don't pass those messages through gettext so they are
  always in 7 bit ASCII English

- do pass them through gettext but append a 7-bit ASCII
  filter so things do get passed in pseudo ASCII (this will
  work for many singlebyte encodings but more often than
  not for multibyte ones)

Both changes would be less intrusive than postponing the
translation.

If I had a choice I would opt for the first.

Karsten
--
GPG key ID E4071346 @ wwwkeys.pgp.net
E167 67FD A291 2BEA 73BD  4537 78B9 A9F9 E407 1346

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

Предыдущее
От: Julius Tuskenis
Дата:
Сообщение: Re: Load Image File From PostgreSQL DB
Следующее
От: Tom Lane
Дата:
Сообщение: Re: encoding of PostgreSQL messages