Re: Windows locale cause server to send invalid data encoding to client

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Windows locale cause server to send invalid data encoding to client
Дата
Msg-id 3484083.1626272399@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Windows locale cause server to send invalid data encoding to client  (Julien Rouhaud <rjuju123@gmail.com>)
Список pgsql-bugs
Julien Rouhaud <rjuju123@gmail.com> writes:
> On Wed, Jul 14, 2021 at 01:49:24PM +0200, Antoine wrote:
>> I set up a postgresql server on Windows 10 and connected it using Rust, but
>> the Rust client reports invalid UTF-8 data when the password is wrong. I
>> use a french locale windows that contain some accents "éèê" etc.

> This is unfortunately working as designed.  The client encoding can't be set
> during startup (and authentication is part of it), see
> https://github.com/postgres/postgres/blob/master/src/backend/utils/mb/mbutils.c#L85-L88
> for more details about it:

It seems like the core problem is that the "authentication failed" error
text may be sent in an unexpected encoding.  I wonder if we should decline
to translate any error messages until we've established the requested
client encoding.  Sending the message in English isn't ideal either,
but it'd avoid this hazard.

            regards, tom lane



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

Предыдущее
От: Julien Rouhaud
Дата:
Сообщение: Re: Windows locale cause server to send invalid data encoding to client
Следующее
От: Pawel Kudzia
Дата:
Сообщение: Re: IRe: BUG #16792: silent corruption of GIN index resulting in SELECTs returning non-matching rows