title: inserting unicode values in mysql using python
body: <p>I want to insert unicode text to mysql table, so for this I have written below code</p>
  
  <p>I am using flask framework</p>
  
  <pre><code>import MySQLdb as ms
  db = ms.connect("localhost","username","password","dbname")
  cursor = db.cursor()
  
  my_text = "का" #this is marathi lang word
  enc = my_text.encode('utf-8')  #after encoding still it shows me marathi word
  db_insert = "INSERT INTO TEXT(text) VALUES '{0}'"
  cursor.execute(db_insert,(enc))
  db.commit()
  </code></pre>
  
  <p>It gives me following error</p>
  
  <blockquote>
    <p>TypeError: not all arguments converted during string formatting on line cursor.execute()</p>
  </blockquote>
  
  <p>How to remove this error ?</p>