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?

3
  • It is hard to say on which step the process failed based on your description. As you can see 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. Commented Aug 17, 2017 at 21:41
  • it gets double encoded (force UTF-8 encode on an already utf-8 source) Commented Aug 18, 2017 at 4: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] (stackoverflow.com/questions/42130110/…) by @Philip Couling. It worked and the issue is solved!! Commented Aug 21, 2017 at 10:02

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.