title: Encoding in ROracle
body: <p>I'm having issues importing norwegian characters like æ, ø, and å from an Oracle database using ROracle. I've had similar problems with RODBC before. I don't have the problem when importing from files like csv and xlsx, I'm sure the problem is with setting the encoding when importing with ROracle, but the documentation does't really tell me how to do that.</p>
  
  <p>Various answers write a function for converting to UTF-8 after importing, but that is not a solution that works for me. I wish to make queries to the oracle DB using the dplyr package and need to be able to query using letters like <code>æøå</code>.    </p>
  
  <p>Here is my connection string, and the sql-query I use as a test:</p>
  
  <pre><code>library(ROracle)
  
  drv &lt;- dbDriver("Oracle", unicode_as_utf8 = TRUE, ora.attributes = TRUE)
  # Create the connection string
  host &lt;- "xx.xxx.xx.x"
  port &lt;- xxxx
  sid &lt;- "xxxxxx"
  connect.string &lt;- paste(
    "(DESCRIPTION=",
    "(ADDRESS=(PROTOCOL=tcp)(HOST=", host, ")(PORT=", port, "))",
    "(CONNECT_DATA=(SID=", sid, ")))", sep = "")
  con &lt;- dbConnect(drv, username = "",
                   password = "",dbname=connect.string)
  
  test &lt;- dbGetQuery(con, "SELECT DECODE FROM T_CODE where key_id=17")
  </code></pre>
  
  <p>That gives me results like this: <code>R?dgivningskontor</code></p>
  
  <p>Here is my session info: </p>
  
  <pre><code>R version 3.5.0 (2018-04-23)
  Platform: x86_64-apple-darwin15.6.0 (64-bit)
  Running under: macOS High Sierra 10.13.4
  
  Matrix products: default
  BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
  LAPACK: /Library/Frameworks/R.framework/Versions/3.5/Resources/lib/libRlapack.dylib
  
  locale:
  [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
  
  attached base packages:
  [1] stats     graphics  grDevices utils     datasets  methods   base     
  
  other attached packages:
  [1] ROracle_1.3-1 DBI_1.0.0    
  
  loaded via a namespace (and not attached):
  [1] compiler_3.5.0 tools_3.5.0    yaml_2.1.19  
  </code></pre>