title: Postgres CSV UTF8 encoding problem åäö (Python)
body: <p>I am having an encoding problem with Postgres when importing a CSV file.</p>
  
  <p>I have created a database in Postgres and created all the data I want in a csv file. My database client and server encoding is UTF8 and I saved the file as UTF8. I´ve tried saving it in different editors like Excel, Apache Open Office, NotePad++ all in UTF8, but I import it to Postgres using \COPY statement the Swedish characters åäö won't work and are showing ├Ñ, ├ñ,├Â and other characters as well. </p>
  
  <p>I guess it is an encoding problem but as I know my database is in UTF8 and the CSV file the same, and what´s really frustrating is that it worked the other day and I am 99% sure I did the same thing...</p>
  
  <p>I managed to get around the letters in the database using</p>
  
  <pre><code>UPDATE places SET description = replace(description, '├Ñ', 'å');
  </code></pre>
  
  <p>However them I connect to the database using psycopg2 in Python the characters are showing like ”, † etc even though Python encoding is UTF8 as well. But really I want to fix it in the database and not go around it like this.</p>
  
  <p>It seems to be an issue when the file is being imported to Postgres but I feel like I´ve tried everything.. Any ideas?</p>