title: Importing russian characters from Sql Server to R dataframe
body: <p>I'm using this code: </p>
  
  <pre><code>library(RODBC)
  sql3 &lt;- "SELECT TOP 10 Address AS Addr 
    FROM dbo.Address 
    Where CountryCode = 'RU'"
  con &lt;- odbcDriverConnect('driver={SQL SERVER};server=servername;database=databasename;trusted_connection=true')
  df &lt;- as.data.frame(sqlQuery(con,sql3),stringsASFactors=FALSE)
  print(df)
  </code></pre>
  
  <p>Which produces the following results:</p>
  
  <pre><code>&gt; print(df)
                                                                   Addr
      1                                 115573, ??????, ???????? ?-?, ?.22?
      2                            107113 ??????, ????? ???????????, ??? 26
      3                         142200 ??, ?.????????, ??????????? ?., ?. 1
      4                   614022 ?????, ?????????????? ?????, ??. ????, 37?
      5              109453 ?. ?????? ????????????? ????????, ?. 19, ???. 2
      6                                  129282 ??????, ??. ???????, ?.13-?
      7                         603000 ?????? ????????, ??????? ????????, 2
      8                    103164 ??????, ????? ??????? ???????????, ??? 26
      9             197341, ?????-?????????, ??-? ???????????, ?.19, ????.2
      10 429950, ?????????? ???????, ?. ??????????????, ??. ??????????, 42?
  </code></pre>
  
  <p>The results should be a list of Russian addresses. </p>
  
  <p>As you can maybe see, all 'regular' characters are getting imported fine (e.g. numbers), but the Russian characters aren't making it. I'm guessing I somehow need to set the character encoding before it reaches the dataframe, but I'm not sure how to do that. Also to clarify, the correct address characters appear when the data is queried from SSMS. </p>
  
  <p>Any pointers would be appreciated, thanks. </p>