Home > Software design >  peewee mysql, how to make sure emoji are properly stored and retrieved (getting ?'s)
peewee mysql, how to make sure emoji are properly stored and retrieved (getting ?'s)

Time:12-28

I have emoji stored in varchar column in MYSQL8, with charset utf8mb4 encoding utf8mb4_unicode_ci I am getting the value with peewee and I'm getting ?'s instead.

What may I be doing wrong? What else do I have to do to make sure emojis come through intact?

CodePudding user response:

You might try setting charset='utf8mb4 in your db constructor:

MySQLDatabase(..., charset='utf8mb4')
  • Related