Re: client_encoding is WIN1252 on ErrorMessage at the StartupMessage

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: client_encoding is WIN1252 on ErrorMessage at the StartupMessage
Дата
Msg-id 1571714.1702085443@sss.pgh.pa.us
обсуждение исходный текст
Ответ на client_encoding is WIN1252 on ErrorMessage at the StartupMessage  (Jean-Yves Garneau <Jean-Yves.Garneau@invest-quebec.com>)
Ответы RE: client_encoding is WIN1252 on ErrorMessage at the StartupMessage  (Jean-Yves Garneau <Jean-Yves.Garneau@invest-quebec.com>)
Список pgsql-interfaces
Jean-Yves Garneau <Jean-Yves.Garneau@invest-quebec.com> writes:
> I'm developing the wire protocol on programmable logic controller (PLC) to communicate with the backend server.
> The PostgreSQL server run on Windows 10 French Canadian.
> The client_encoding on the server and database encoding is UTF8.
> The collation and character type are French_Canada.1252.
> The PLC is UTF8.
> After TCP/IP connection, the PLC send the "StartupMessage" but receive an "ErrorResponse" because no access right.
> The error message is in WIN1252 not UTF8!
> If grant connect access to user and get data from database all is UTF8!
> Is it a bug or bad setup?

Bad setup, I'd say.  If you have a connection failure before the backend
has joined a particular database, it won't have adopted any database-level
encoding or locale; moreover I don't think it's capable of doing encoding
translation at that point.  So any such messages are going to be sent with
encoding matching the postmaster process's native locale, which you seem
to have chosen more or less at random.  If you have a global expectation
about what encoding to use, best make the postmaster's startup locale
settings match that.

            regards, tom lane



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

Предыдущее
От: Jean-Yves Garneau
Дата:
Сообщение: client_encoding is WIN1252 on ErrorMessage at the StartupMessage
Следующее
От: Jean-Yves Garneau
Дата:
Сообщение: RE: client_encoding is WIN1252 on ErrorMessage at the StartupMessage