Postgres sql error when writing a special character

I got an error when I try to write these two words in postgresql

MetroÂ
Logic

  ERROR: invalid byte sequence for encoding "UTF8": 0xa0
 HINT: This error can also happen if the byte sequence does not match the encoding expected by the server, which is controlled by "client_encoding".

 ERROR: invalid byte sequence for encoding "UTF8": 0x92
 HINT: This error can also happen if the byte sequence does not match the encoding expected by the server, which is controlled by "client_encoding".
+4
source share
1 answer

Your input encoding is not UTF-8. I can reproduce this behavior if, for example, I embed the ISO-8859-1 file in linux with psql. You must change the encoding of the input.

+1
source

Source: https://habr.com/ru/post/1447413/


All Articles