title: UnicodeEncodeError: 'ascii' codec can't encode while exporting csv to mysql
body: <p>I am trying to export csv file to mysql  and I receive this error everytime I try to print.
  Any help would be appreciated.I dont now where am i going wrong..</p>
  
  <pre><code>  reader = csv.reader(open(csvfile, 'r'))
  
      for row in reader:
          print row
          try:
              (location_id, vrm, valid_datetime) = row
          except:
              print "Error with row: " % row
              #sys.exit(3)
  
  
          # Hack for Roseburys
          if (location_id == 262):
              location_id = "198"
          if (location_id == "262"):
              location_id = "198"
  
  
          tmp = valid_datetime.split(" ")
          valid_date = tmp[0]
  
          # Tidy up the VRM
          vrm = vrm.replace(' ', '')
          vrm = vrm.upper()
  
          tmp = valid_date.split('/')
          iso_date = "%s-%s-%s" % (tmp[2], tmp[1], tmp[0])
          entryDatetime = "%s 00:00:00" % iso_date
          expiryDatetime = "%s 23:59:59" % iso_date
          sql_local = """INSERT INTO customer_1.pay_and_display
              (plate, machine_id, ticket_datetime, expiry_datetime, ticket_name, ticket_price)
              VALUES ("%s", "%s", "%s", "%s", "%s", "%s") """ % (vrm, location_id, entryDatetime, expiryDatetime, "WL", 0)
          print sql_local
          cursor.execute(sql_local)
  </code></pre>