title: How to fix encoding problem with Spark JDBC?
body: <p>I have table in Oracle which has some records in Russian.</p>
  
  <p>When I read this table with Spark JDBC, I receive dataframe with not correct values.</p>
  
  <p>Do you have idea why it is happening and how to fix that?</p>
  
  <pre><code>// executes given query using jdbc
    def executeQuery(spark: SparkSession, configuration: Map[String, String], sql_statement: String): DataFrame
    = spark.read.format("jdbc")
      .option("driver", "oracle.jdbc.OracleDriver")
      .option("url", s"jdbc:oracle:thin:@//${configuration("address")}")
      .option("user", configuration("username"))
      .option("password", configuration("password"))
      .option("dbtable", s"(${sql_statement})")
      .option("fetchSize", configuration("fetch_size"))
      .load()
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/Etd8X.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Etd8X.png" alt="enter image description here"></a></p>
  
  <p><a href="https://i.stack.imgur.com/yZVX7.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/yZVX7.png" alt="enter image description here"></a></p>