0

I am importing a CSV file into a PostgreSQL table through the PostgreSQL import functionality, but I get this error:

character with byte sequence 0xe2 0x80 0xa6 in encoding utf8 has no equivalent in encoding latin1

Please help me out with this...

Laurenz Albe
  • 209,280
  • 17
  • 206
  • 263
Amit Gupta
  • 11
  • 3
  • 9
  • Hi, Which piece of code is giving you this error. Its always best to show us code on SO – RiggsFolly Sep 10 '18 at 09:08
  • It might be worth you [reading this Q&A - UTF-8 All the way through](https://stackoverflow.com/questions/279170/utf-8-all-the-way-through) – RiggsFolly Sep 10 '18 at 09:08
  • what code i should show u , as i am simply uploading a cvs file at postgresql server in godaddy... – Amit Gupta Sep 10 '18 at 09:22
  • Well to be complete. 1) The PHP code doing the upload. 2) The schema for the table or tables that you are loading. 3) The line from the CSV file that first causes this problem, plus a couple of lines either side of the problem line – RiggsFolly Sep 10 '18 at 09:26
  • i am "importing" a csv file into postgress table through the postgress import functionality... plz try to understand that... not using any php code for uploading... Same import function is working at my localhost, but not on Godaddy postgress db server – Amit Gupta Sep 10 '18 at 09:44
  • Ah, that was NOT CLEAR from your original question. Maybe if you added that to your question, you would get some useful help – RiggsFolly Sep 10 '18 at 09:46

1 Answers1

3

You are trying to import an UTF-8 file that contains the character (“horizontal ellipsis”, Unicode code point 2026).

This character cannot be encoded in LATIN1, so you will not be able to do that.

Either use a database with encoding UTF8 or edit the import file to remove the character.

Laurenz Albe
  • 209,280
  • 17
  • 206
  • 263