pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: radagast42@gmx.net
To: 'Erik Wienhold' <ewie@ewie.name>
Cc: 'Daniel Gustafsson' <daniel@yesql.se>
Cc: pgsql-bugs@lists.postgresql.org
Subject: AW: AW: Wrong german error message encoding
Date: Thu, 21 Nov 2024 16:11:51 +0100
Message-ID: <00f101db3c27$b2198690$164c93b0$@gmx.net> (raw)
In-Reply-To: <af8c47e7-c0a3-4f96-9d77-9356e1075ee0@ewie.name>
References: <00a601db3b20$b00261e0$100725a0$@gmx.net>
	<D4471278-CED7-405A-92EA-8E5B0FCBB69A@yesql.se>
	<00b001db3c10$dfa3f850$9eebe8f0$@gmx.net>
	<af8c47e7-c0a3-4f96-9d77-9356e1075ee0@ewie.name>

That does not help.
After doing it typing ä or ß results in wrong characters and the connection fails nonetheless:

	PS C:\tmp> chcp 1252
	Aktive Codepage: 1252.
	PS C:\tmp> 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 the behaviour of psql is another issue, my original error report is about German error message encoding when connecting directly via socket or libpq.

Markus

-----Ursprüngliche Nachricht-----
Von: Erik Wienhold <ewie@ewie.name> 
Gesendet: Donnerstag, 21. November 2024 15:53
An: radagast42@gmx.net
Cc: 'Daniel Gustafsson' <daniel@yesql.se>; pgsql-bugs@lists.postgresql.org
Betreff: Re: AW: Wrong german error message encoding

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






Message-ID: <00f101db3c27$b2198690$164c93b0$@gmx.net>
Permalink:  ../00f101db3c27$b2198690$164c93b0$@gmx.net/
Also on:    postgresql.org/message-id/00f101db3c27$b2198690$164c93b0$@gmx.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: radagast42@gmx.net, ewie@ewie.name, daniel@yesql.se, pgsql-bugs@lists.postgresql.org
  Subject: Re: AW: AW: Wrong german error message encoding
  In-Reply-To: <00f101db3c27$b2198690$164c93b0$@gmx.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox