2

I have installed postgreSQL.

I use pgAdminIII as admin panel.

I am trying to watch tables content and see following:

pgadmin screenshot

How to avoid encoding problem?

5
  • 2
    What is the encoding of your database? Commented Oct 4, 2014 at 11:18
  • 1
    Just click on the database in the pgAdmin object browser. The encoding should be listed on the right. Commented Oct 4, 2014 at 11:23
  • There wrote: ** Encoding UTF8 ** Commented Oct 4, 2014 at 11:25
  • @Nick Barnes dl2.joxi.net/drive/0005/3037/338909/141004/638c33dde3.jpg Commented Oct 4, 2014 at 11:26
  • @Nick Barnes do you have ideas? Commented Oct 4, 2014 at 12:19

1 Answer 1

2

For a UTF8 database, pgAdmin should always display strings correctly. The most likely explanation is that the data itself is incorrect.

This generally happens when a client application sends data in a format which doesn't match its client_encoding setting. If this is the case, setting client_encoding correctly would prevent this from happening (provided the client application's code page is supported by Postgres). This wouldn't fix the existing data, but it might be possible to repair it with the convert function.

Sign up to request clarification or add additional context in comments.

5 Comments

I executed it from windows cmd like this C:\Users\redwhite>psql -U marc -d marc_db -a -f D:\sql\postgres\init.sql
In cmd I see following VALUES (1, 6, 'Р?РчС?Р?С<Р№ С'РчС?Р?РёР?Р°Р>', '19:00', '5', 55.67834420000001, 37.79668899999999, 35, 7, 'Р?РчС?Р?С<Р№', 0, 0, 0, 'linux', '9:00', 'Р?С?С?РєРёР?Р°', 'Р?РєС'РёР?РчР?', 0, 5, 9, 1, 1, NULL, 1, 1);
What happens if you run the script from pgAdmin?
ddl(database creation) script doesn't work but insert script work properly and names are good encoded
You might just need to set psql's client encoding to match the file encoding. You can do this by running set PGCLIENTENCODING=... in cmd. The list of allowed encodings is here.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.