0

I have excel files containing German characters (äöüß)

I am converting these excel files and creating the csv files with UTF-8 encoding using the method mentioned here, In the section "How to convert Excel to CSV UTF-8"

I am using these csv files to import the data to the postgreSQL database using HeidiSQL tool. But once the data gets imported to the database all the German characters are getting converted to weird characters (for eg: ö to ö and ü to ü)

How else can I import the csv files so that all the German characters remain the same when it gets imported to the postgreSQL database?

Community
  • 1
  • 1
  • It is hard to say on which step the process failed based on your description. As you can [see](https://ibin.co/3XEVl4R4ssVu.png) everything works fine here (using LibreOffice to convert the spreadsheet to CSV and psql to import it to the DB). So: check your CSV file, is it really in UTF-8 encoding? Check your database encoding: `show server_encoding;` in any query tool, is it really UTF8? Try to use another tools to perform the import. – Abelisto Aug 17 '17 at 21:41
  • it gets double encoded (force UTF-8 encode on an already utf-8 source) – cske Aug 18 '17 at 04:18
  • Thank you so much for the comment. I just checked my database encoding and it said it is in WIN1252. Now I followed the instructions as mentioned in this post. [link] (https://stackoverflow.com/questions/42130110/character-with-byte-sequence-0x9d-in-encoding-win1252-has-no-equivalent-in-enc?answertab=votes#tab-top) by @Philip Couling. It worked and the issue is solved!! – Chandrasen D Rajashekar Aug 21 '17 at 10:02

0 Answers0