“Illegal mix of collations” when string has emoji
-
We receive a PHP error when TranslatePress 2.6.5 tries to translate a sentence containing an emoji:
[12-Nov-2023 03:50:37 Europe/Rome] PHP Fatal error: Uncaught mysqli_sql_exception: Illegal mix of collations for operation ' IN ' in /home/hlsparke/public_html/portal/wp-content/plugins/translatepress-multilingual/includes/trp-ajax.php:154
Stack trace: 0 /home/hlsparke/public_html/portal/wp-content/plugins/translatepress-multilingual/includes/trp-ajax.php(154): mysqli_query(Object(mysqli), 'SELECT original…') 1 /home/hlsparke/public_html/portal/wp-content/plugins/translatepress-multilingual/includes/trp-ajax.php(32): TRP_Ajax->output_translations(Array, Array, 'it_IT', 'en_US') 2 /home/hlsparke/public_html/portal/wp-content/plugins/translatepress-multilingual/includes/trp-ajax.php(182): TRP_Ajax->__construct() 3 {main}For example, the following mysql command will generate the error on server (see the
??
emoji):SELECT original, translated, status FROM wp_trp_dictionary_en_us_it_it WHERE original IN ('Descrizione','iTronix is the new','from SparkEVO.','electronic ignition box','Specifically made for two-strokes engines, it lets you control lots of parameters and features of your engine.','Up to 6 programmable timing maps','RPM limiter for each timing map','Quick shift','Supports the handlebar map switch','Data logging on PC','Real-time monitoring via Smartphone and PC','It is compatible with major two-strokes, inner-rotor, ignition systems like PVL (',') and Selettra.','no battery needed!','You can configure it using','Windows/MacOS desktop and Android/iOS smartphone','Il manuale e link utili verranno trasmessi via email.','USB-C cable is not included','?? I tempi di spedizione variano da 5 a 15 giorni a seconda delle zone geografiche. Potrebbero aumentare nei periodi di alta richiesta.','Domande?','La tua email','Il tuo messaggio','Invia','#tab-description','Contact form') AND status != 0
The collation of whole database and tables is utf8mb4_unicode_ci, so I don’t understand what the problem is. Can you help me?
The page I need help with: [log in to see the link]
- The topic ‘“Illegal mix of collations” when string has emoji’ is closed to new replies.