Hello.
I think there is a wrong encoding for (at least) German localized error messages.
Setup:
- Standard installation of PostgreSQL 16.4 on a German Windows 10.
- Create a new database with at least one German “Umlaut” in it with pgAdmin, e.g. “träshableß”
To reproduce the error:
- Connect to the new database “träshableß” via socket (or libPq)
- Connection is successful
- Disconnect and connect again with a wrong dbname instead, e.g. “träshable”
- You get the following byte array back as error message:
#[68 97 116 101 110 98 97 110 107 32 187 116 114 195 164 115 104 97 98 108 101 171 32 101 120 105 115 116 105 101 114 116 32 110 105 99 104 116]
- UTF8 decoded this results in:
Datenbank �träshable� existiert nicht
- Note the garbled double quotes
- MS-CP-1252 decoded this results in:
Datenbank »träshable« existiert nicht
- Note the garbled „ä“ here
I assume that at least this error message template is encoded with MS-CP-1252 instead of UTF8, but it all German localized error messages for connection errors may be affected.
I can reproduce the same encoding problems when using a user with a German “Umlaut” in it, e.g. “ünknöwn”.
Best regards,
Markus Rips