简体   繁体   中英

How to fix Encoding error utf-8 - PostgreSQL

I am following instructions online to create a database in pgAdmin4. I have successfully imported a csv file and created a table. However, I cannot select anything from the table.

My code is:

SELECT * FROM transfers;

Error message is: 'utf-8' codec can't decode byte 0xc3 in position 0: unexpected end of data

Running 'show server_encoding' gives "UTF8" in the output. Running 'show client_encoding gives "UNICODE" in the output.

Maybe you saved an excel file as csv and imported to postgre, if so, open excel, create a blank csv file and copy/paste your excel data to there and save. Delete your previous postgre table and import newly created csv file again.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM