Articles of collation

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 […]

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 […]

Please explain how WordPress works with MySQL character set and collation at a low level

As the question title suggests, I’m looking to understand how WordPress works with MySQL character sets and collation options. As I will show below, things don’t make much sense to me… I installed WordPress by following the instructions on their installation page: https://codex.wordpress.org/Installing_WordPress As part of the instructions, I followed their advice for manual creation […]

Default table collation on plugin activation?

I’m following this to make my plugin auto-create a table when the plugin is activated, but what happens is that while all the tables (the whole db) are utf8_general_ci, the newly created table is latin1_swedish_ci… Why isn’t it also utf8? I thought it would also be utf8 by default since I have: define(‘DB_COLLATE’, ‘utf8_general_ci’); in […]