I have a mySQL table which is set to CHARACTER SET utf8mb4 and a column x which has CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci, and I can run an SQL command directly on the database which inserts a 4-byte unicode character, like
INSERT INTO mytable (x) VALUES ('');
but when I run the following in web2py, I get a different entry, which looks like ????
sql = u"INSERT INTO mytable (x) VALUES (%s)"
db.executesql(sql, (u'',))
Is there something I need to set in web2py somewhere to tell it to pass the unicode characters through without alteration?
Addendum: the same ????
entry occurs when I use the DAL too, as in
db.mytable.insert(x=u'')