问题
I have an array containing SQL query result. I need to convert this array in tuple to make a request like this:
t = tuple(data)
querysring="INSERT INTO %s VALUES %s "%(table,t)
cur.execute(querysring)
But my array contains values like ['François','données'] and when I convert this in tuple it's make and insert 'Fran\xc3\xa7ois' in my database.
I have try to decode and encode (utf-8) but it seem not working.
Any suggestions ?
来源:https://stackoverflow.com/questions/43629059/encoding-in-tuple-python