title: How to read a SQL file with python with proper character encoding?
body: <p>Based on a few examples (<a href="https://stackoverflow.com/questions/17261061/execute-sql-schema-in-psycopg2-in-python">here</a>, <a href="https://stackoverflow.com/questions/36416405/use-python-and-psycopg2-to-execute-a-sql-file-that-contains-a-drop-database-stat">here</a>) I can use psycopg2 to read and hopefully run a SQL file from python (the file is 200 lines, and though runs quickly, isn't something I want to maintain in a python file).</p>
  
  <p>Here is the script to read and run the file:</p>
  
  <pre><code>sql = open("sql/sm_bounds_current.sql", "r").read()
  
  curDest.execute(sql)
  </code></pre>
  
  <p>However, when I run the script, the following error is thrown:</p>
  
  <pre><code>Error: syntax error at or near "ï»¿drop"
  LINE 1: ï»¿drop table dpsdata.sm_boundaries_current_dev;
  </code></pre>
  
  <p>As you can see, the first line in the script is to drop a table, but I'm not sure why the extra characters are being read, and can't seem to find a solution that might set the encoding of the file when reading it.</p>