Wrong german error message encoding - Mailing list pgsql-bugs

From
Subject Wrong german error message encoding
Date
Msg-id 00a601db3b20$b00261e0$100725a0$@gmx.net
Whole thread Raw
Responses Re: Wrong german error message encoding
List pgsql-bugs

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

 

pgsql-bugs by date:

Previous
From: Noah Misch
Date:
Subject: Re: 'WARNING: you don't own a lock of type ExclusiveLock' is printed during the GRANT command on PostgreSQL16.5
Next
From: Bertrand Drouvot
Date:
Subject: Re: BUG #18711: Attempting a connection with a database name longer than 63 characters now fails