title: Getting error :" 'utf-8' codec can't decode byte 0x99 in position 2: invalid start byte" while writing data into csv file using mysql.connector
body: <p>I am trying to write csv file in Python from MYSQL using the mysql.connector using the connection class but getting error :  'utf-8' codec can't decode byte 0x99 in position 2: invalid start byte"</p>
  
  <pre><code>import mysql.connector
  from mysql.connector import connection
  
  session = connection.MySQLConnection(host = db_config.host , user = db_config.user , password = db_config.password , database = db_config.db )
  
  curr = session.cursor()
  curr.execute("Query")
  records = curr.fetchall()
  with open(extract_file, 'w' ,encoding ='latin1' ) as fp:
      a = csv.writer(fp, delimiter=delimiter,quotechar = '"') ##, quoting=csv.QUOTE_ALL)
      for row in records:
          a.writerow(row)
  </code></pre>
  
  <p>I am getting error while writing BLOB columns values to the file
  Any thoughts on this issue ?</p>
  
  <p>while writing data </p>