I already changed my table and column collation to utf8mb4_bin
.
When making the connection, I passed the utf8
charset
value mysql.connector.connect(host="localhost", user="root", password="****", database="dbname", charset='utf8')
I even added the following statement right after opening the connection:
mycursor = mydb.cursor()
mycursor.execute("SET NAMES utf8;")
mydb.commit()
It only works partially. For example, this emoji is displayed in the table as you see it here: ⚡️
But these (a few examples): are displayed in table as ???? (4 question marks).
What did I forget to set or change?