mmucklo / DtcQueueBundle

Symfony2/3/4/5 Queue Bundle (for background jobs) supporting Mongo (Doctrine ODM), Mysql (and any Doctrine ORM), RabbitMQ, Beanstalkd, Redis, and ... {write your own}
MIT License
120 stars 38 forks source link

how to use emoji/smiley inside a worker message ? #154

Closed ibasaw closed 1 year ago

ibasaw commented 1 year ago

hi,

i am on symfony3

i try to use emoji in a string text message, send it to a worker, then save the string text message with emoji inside my mysql database.

my collation is : utf8mb4_unicode_ci

here the error when the message is processed by the worker: Invalid datetime format: 1366 Incorrect string value: '\xF0\x9F\x98\x8A\";...' for column xxx.dtc_queue_job.args at row 1

how to save content with emoji through a worker ?

ibasaw commented 1 year ago

You must set the collation on the field too, not only the table, where you saved emoji !!! In this case on the args field on job and job_archive

problem solved