title: UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in position 54: ordinal not in range(128)
body: <p>I know, it has been asked several times, but none of the answer gave me a solution</p>
  
  <p>Here is the code (Python 2.7):</p>
  
  <pre><code>import cx_Oracle
  import pandas as pd
  
  connstr = 'MyConstr'
  conn = cx_Oracle.connect(connstr)
  cur = conn.cursor()
  
  xl = pd.ExcelFile("C:\\TEMP\\for_kkod.xlsx")
  df = xl.parse(0)
  
  for i in df.index:
      s = u"insert into MY_TABLE values({0}, '{1}')".format(int(df.iloc[i]['kkod']), df.iloc[i]['kkodnev'])
      print s
      print type(s)
      cur.execute(s)
  </code></pre>
  
  <p>The result of the 2 prints are this:</p>
  
  <pre><code>insert into MY_TABLE values(10, 'Készítés')
  &lt;type 'unicode'&gt;
  </code></pre>
  
  <p>As you can see the type of s is unicode but nevertheless I have this error message:</p>
  
  <pre><code>UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in position 54: ordinal not in range(128)
  </code></pre>
  
  <p>I have tried with and without u"", with and without encode and decode in all possible ways but still the same error message</p>
  
  <p>Any idea?</p>