title: how to insert utf8 characters into oracle database using robotframework database library
body: <p>I have a robot script which inserts some sql statements from a sql file; some of these statements contain utf8 characters. If I insert this file manually into database using navicat tool, everything's fine. But when I try to execute this file using database library of robot framework, utf8 characters go crazy!</p>
  
  <p>This is my utf8 included sql statement:</p>
  
  <pre><code>INSERT INTO "MY_TABLE" VALUES (2, 'تست1');
  </code></pre>
  
  <p>This is how I use database library:</p>
  
  <pre><code>Connect To Database Using Custom Params     cx_Oracle   ${dbConnection}
  Execute Sql Script      ${sqlFile}
  Disconnect From Database
  </code></pre>
  
  <p>This is what I get in the database:</p>
  
  <pre><code>������������ 1
  </code></pre>
  
  <p>I have tried to execute the SQL file using <code>cx_Oracle</code> directly and it's still failing! It seems there is a problem in the original library. This is what I've used for importing SQL file:</p>
  
  <pre><code>import cx_Oracle
  if __name__ == "__main__":
      dsn_tns = cx_Oracle.makedsn(ip, port, sid)
      db = cx_Oracle.connect(username, password, dsn_tns)
      sql_commands = open(sql_file_addr, 'r').read().split(";")
      cr = db.cursor()
      for command in sql_commands:
          if not command in ["", "\t", "\n", "\r", "\n\r", "\r\n", None]:
              print "Executing SQL command:", command
              cr.execute(command)
  
      db.commit()
  </code></pre>
  
  <p>I have found that I can define character-set in the connection string. I've done it for <code>mysql</code> database and it the framework successfully inserted UTF8 characters into database; this is my connection string for MySQL:</p>
  
  <pre><code>database='db_name', user='db_username', password='db_password', host='db_ip', port=3306, charset='utf8'
  </code></pre>
  
  <p>But I don't know how to define character-set for Oracle connection string. I have tried this:</p>
  
  <pre><code>'db_username','db_password','db_ip:1521/db_sid','utf8'
  </code></pre>
  
  <p>And I've got this error:</p>
  
  <pre><code>TypeError: an integer is required
  </code></pre>