Thursday, June 22, 2017

PostgreSQL on Windows: psql complains "no equivalent in encoding"

I am running a PostgreSQL 9.6 server instance on Windows 10 host. When I issue a query via psql on the Windows 10 host, I encounter the following error message,

ERROR:  character with byte sequence 0xd0 0x9c in encoding "UTF8" 
has no equivalent in encoding "WIN1252"

When I query the client_encoding, I get the encoding indeed as WIN1252, shown as follows,

mydb=> show client_encoding;
 client_encoding
-----------------
 WIN1252
(1 row)

I find that the issue disappears and the display of query results appears to be fine. The following is an example to set client_encoding,

mydb=> SET client_encoding = 'UTF8';
SET

2 comments:

  1. Programming is such a difficult job. Sorry I can be of no help but I hope you are able to get the answer to your query soon.

    ReplyDelete
  2. Text API integration plays a vital role in enabling your existing applications or systems to be mobile. When you integrate your software or application with a reliable and feature-rich Text Api, then delivering real-time communication to your customers is easy.

    ReplyDelete