i have a problem with to import this format CSV file by your encoding
my query is:
\copy tablename from " path of the file.csv" DELIMITERS ';' CSV
OR
\copy tablename from " path of the file.csv" DELIMITERS ';' CSV header encoding 'UTF8'
OR
\copy tablename from " path of the file.csv" DELIMITERS ';' CSV header encoding 'WIN1252'
but, doesn´t insert the file data because it has an error
"error: character to byte 0x8d sequence encoding UTF8" OR
"error: character to byte 0x8d sequence encoding WIN1252"
these errors output are because I have chars Ñ,Ã and other
what type of encoding should I use?
I resolved the problem was to place the latin1 encoding
so: \copy tablename(column1, colum2.. columnN) FROM 'path_file.csv' DELIMITER ';' NULL AS ' ' CSV header encoding 'latin1';
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With