C # connection PostgreSQL queries Chinese characters garbled situation

At the end of the connection string plus encoding = UNICODE

string connStr = "Server=localhost;Port=5432;UserId=xxxx;Password=xxxxx;Database=test;encoding=UNICODE";

Otherwise there will be Chinese characters appear as follows:

 

Guess you like

Origin www.cnblogs.com/huangyanjia/p/12389759.html