I have the following list of providers (in Russian):
providers = [u'\u041e\u041e\u041e "\u041a\u0432\u0430\u0440\u0442\u0430\u043b
\u041b\u0435\u043e\u043f\u043e\u043b\u0438\u0441"',
u'\u0426\u0435\u043d\u0442\u0440\u0430\u043b']
These are obviously in unicode. Previously, to do a SQL SELECT, I was doing:
providers = tuple([str(item) for item in providers])
sql += " WHERE provider IN {} GROUP BY date ORDER BY date ASC".format(repr(providers))
cursor.execute(sql,)
Now, since the list items are in unicode, I run into a UnicodeEncodeError.
How would I correctly do this sql statement?