Answer the question
In order to leave comments, you need to log in
How to fix krakozyabry instead of cyrillic in PostgreSQL dump?
I understand that the encoding is wrong somewhere, but I don’t understand where exactly.
Important: krakozyabry only in the dump. The application in which I use this database displays the Cyrillic alphabet as it should.
The base to be transferred contains the UTF8 encoding and the locale russian_Russia.1251
client_encoding - WIN1251
server_encoding - UTF8
I create a dump like this:
pg_dump -U postgres -W -E UTF8 -d dbname > dbname.sql
SET CLIENT_ENCODING TO UTF8
$ locale
LANG=en_US.UTF-8
LANGUAGE=en_US
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC=ru_UA.UTF-8
LC_TIME=ru_UA.UTF-8
LC_COLLATE="en_US.UTF-8"
LC_MONETARY=ru_UA.UTF-8
LC_MESSAGES="en_US.UTF-8"
LC_PAPER=ru_UA.UTF-8
LC_NAME=ru_UA.UTF-8
LC_ADDRESS=ru_UA.UTF-8
LC_TELEPHONE=ru_UA.UTF-8
LC_MEASUREMENT=ru_UA.UTF-8
LC_IDENTIFICATION=ru_UA.UTF-8
LC_ALL=
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question