Character Encoding for wp_options

I’ve been looking for a solution to my problem for a while now. Under my wp_options page I have the following serialized entry saved: a:17:{s:11:”date_format”;s:5:”d/m/Y”;s:15:”currency_symbol”;s:1:”$”;s:14:”recaptcha_lang”;s:2:”en”;s:13:”req_div_label”;s:0:””;s:16:”req_field_symbol”;s:1:”*”;s:15:”req_error_label”;s:81:”Por favor, certifique-se de que todos os campos obrigatórios estão preenchidos.”;s:15:”req_field_error”;s:29:”Este é um campo obrigatório”;s:10:”spam_error”;s:53:”Por favor responda a pergunta anti-spam corretamente.”;s:14:”honeypot_error”;s:41:”Por favor, deixar o campo spam em branco.”;s:18:”timed_submit_error”;s:47:”Por favor, aguarde a … Read more

Troubleshooting “Illegal mix of collations” error in mysql

Am getting the below error when trying to do a select through a stored procedure in MySQL. Illegal mix of collations (latin1_general_cs,IMPLICIT) and (latin1_general_ci,IMPLICIT) for operation ‘=’ Any idea on what might be going wrong here? The collation of the table is latin1_general_ci and that of the column in the where clause is latin1_general_cs. 17 … Read more

Database with mixed collation (utf8mb4 & utf8_general_ci)

Each time I was uploading my WP install from offline to online, I was noticing strange characters in text and digging a bit I have discovered that wp-config.php on the online server was set to define(‘DB_CHARSET’, ‘utf8mb4’); so each time I would upload the new “release” I had to edit to wp-config.php to utf8 to … Read more

Custom DB_COLLATE (collation) value not working on fresh install?

I always knew that WordPress uses utf8_general_ci as tables collation, but recently it keeps installing utf8mb4_unicode_520_ci. What I do is: Download WordPress from wordpress.org Rename wp-config-example.php to wp-config.php Set the defined constants as below /** Database Charset to use in creating database tables. */ define(‘DB_CHARSET’, ‘utf8’); /** The Database Collate type. Don’t change this if … Read more

One for the gurus: upgrade to 3.x messed up only filenames with accented chars

After upgrading from 2.8.x (maybe it was 2.9.x) to 3.1.2, all the references inside posts to filenames (usually images) which contain accented chars stopped working. Before, filenames that are displayed in the filesystem like “EXPRESSÃO.jpg” would be correctly called out in the post content HTML as “EXPRESSÃO.jpg”. WP 3.x decided to convert those references to … Read more