Re: AW: Wrong german error message encoding

Erik Wienhold <ewie@ewie.name>

From: Erik Wienhold <ewie@ewie.name>
To: radagast42@gmx.net
Cc: 'Daniel Gustafsson' <daniel@yesql.se>, pgsql-bugs@lists.postgresql.org
Date: 2024-11-21T14:53:13Z
Lists: pgsql-bugs
On 2024-11-21 13:28 +0100, radagast42@gmx.net wrote:
> When using psql from the command line I can't even connect to the
> database "träshableß":
> 
> 	psql -d träshableß -U postgres
> 	Passwort für Benutzer postgres:
> 	psql: Fehler: Verbindung zum Server auf »localhost« (::1), Port 5432 fehlgeschlagen: FATAL:  Datenbank »träshableß« existiert nicht
> 
> But in this case I see no garbled error message....
> I have to encode the database name  with MS-CP-1252 to connect:
> 
> 	psql -d träshableß -U postgres
> 	Passwort für Benutzer postgres:
> 	psql (16.4)
> 	Warnung: Konsolencodeseite (850) unterscheidet sich von der Windows-
>          	Codeseite (1252). 8-Bit-Zeichen funktionieren möglicherweise nicht
>          	richtig. Einzelheiten finden Sie auf der psql-Handbuchseite unter
>          	»Notes for Windows users«.
> 	Geben Sie »help« für Hilfe ein.

You should set code page 1252 with

    chcp 1252

You can automate that for new shells by running chcp from your
PowerShell profile.  Variable $profile gives you the filename.

-- 
Erik