title: PostgreSQL R package: encoded polish letters
body: <p>When I read table from Postgre SQL database I get encoded polish letters. The database has encoding <strong>UTF8</strong> and collation <strong>Polish_Poland.1250</strong>. </p>
  
  <p>Code: </p>
  
  <pre><code>library(PostgreSQL)
  # make connection
  drv &lt;- dbDriver("PostgreSQL")
  con &lt;- dbConnect(drv, host="localhost", port=xxxx, user="user", dbname="myBase")
  # read tables and assign to variables
  table &lt;- dbReadTable(con, c("public","table"))
  </code></pre>
  
  <p>Results: </p>
  
  <pre><code>"BYDGOSZCZ"    "wĹ‚ocĹ‚awski" "WROCĹAW"  
  "gostyĹ„ski"   "nowotarski"   "MOGILEĹSKI"  "myĹ›liborski"
  </code></pre>
  
  <p>Should be: </p>
  
  <pre><code>"BYDGOSZCZ"    "włocławski" "WROCŁAW"  
  "gostyński"   "nowotarski"   "MOGILEŃSKI"  "myśliborski"
  </code></pre>
  
  <p><strong>I found the solution!!! This line should be added after the connection:</strong> </p>
  
  <p><code>postgresqlpqExec(con, "SET client_encoding = 'windows-1250'")</code>.</p>