aurumpurum
aurumpurum

Reputation: 1082

psql cannot display german "Umlaute"

I am using psql and realized that the German letters ä, ö, ü are not displayed correctly. For example, ö is displayed as õ. ü is displayed as a three in the exponent...

WARNING: Console code page (850) differs from Windows code page 
(1252) 8-bit characters might not work correctly. See psql 
reference page "Notes for Windows users" for details.

How can I change that?

OS: Windows 10 psql 13.3

The table I have imported to postgres is encoded in UTF8.

I am new to postgres and psql, so sorry for the dumb question.

enter image description here

enter image description here

In the second print screen one can see that the character 'ü' in 'Eigentümer', 'Zürich' and 'Graubünden' is displayed incorrectly.

Upvotes: 0

Views: 1182

Answers (2)

iceboy_22
iceboy_22

Reputation: 11

I had the same problem; just use

\encoding 'UTF8'

Upvotes: 1

aurumpurum
aurumpurum

Reputation: 1082

  1. From the command line or the Terminal:

    chcp 1252

  2. open psql

    psql -U postgres

  3. set client_encoding:

    SET client_encoding='WIN1252'

  4. import file:

    \i Path/to/your/.sqlFile

Upvotes: 1

Related Questions