F
F
fiskoner2020-03-05 16:29:54
PostgreSQL
fiskoner, 2020-03-05 16:29:54

Encoding error while importing csv in postgresql?

Error when importing csv file into table

ERROR: invalid byte sequence for encoding "UTF8": 0xcc 0xe0
��������: COPY wmi_decodes, line 1


The query code is generated by postgresql itself:
"C:\\Program Files\\PostgreSQL\\12\\bin\\psql.exe" --command " "\\copy public.wmi_decodes (mark, wmi, additional_code, manufacturer, mark_owner, country_code, country, additional_info) FROM 'A:/carinfo.csv' DELIMITER ',' CSV ENCODING 'UTF8' QUOTE '\"' ESCAPE '''';""


The database is in UTF-8, the csv file is also in UTF-8, UTF-8 is specified during import.

What is the problem and how to fix it?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question