There is a file dump.sql
It is intended for MySQL

MySQL dump 10.13 Distrib 5.7.20, for Win64 (x86_64) 

DB in cp1251
Error during normal recovery of psql databasename < /path/to/dump/dump.sql such

 ERROR: invalid byte sequence for encoding "UTF8": 0xd3 0xc0 

You need to convert it in such a way that it can be restored to postgresql.
Are there any plugins? or ways?

  • And to translate psql to cp1251 (as described in the documentation, however, it is shown there for 1252, but the essence is the same) —not? - Akina
  • could you give a link, thanks - evans
  • postgresql.org/docs/9.2/static/app-psql.html . See the Notes for Windows Users section. And do not forget that the connection to the database and the table fields should also be CP1251 ... - Akina
  • one
    dump.sql is a plain text file, isn't it? why not just overtake it in utf-8? - Fat-Zer
  • I agree with @ Fat-Zer: when there was a need for such a conversion, I simply converted Far Manager through the clipboard. - Viktor Tomilov

0