Articles of collation

How do I convert a MySQL database from utf8mb4 to utf8 encoding?

What happened: I had my blog hosted on SiteGround and my plan expired. I created a full website backup first which contained all the files including the public_html folder adn the databases associated with my WordPress blog. The issue I’m having now is that I can’t upload my databases on my current host (000WebHost) because […]

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

database collation differences

I have a database for a site I am developing in WAMP. The collation for the database is latin1_swedish_ci but every table in the database is utf84mb_unicode_ci. Should I be worried about this? In the future I can use utf84mb_unicode_ci for both, but what about the databases I already have content in?

Unknown collation when I import a dump from an existing site into a development database?

I exported the sql from an existing database for an existing site that’s hosted on Bluehost. I’d like to be able to import it into the development environment without hitting an issue; I’m flexible, I can change the MySQL version I’m using in the development environment; my goal is to make it as easy as […]

Hebrew Characters Have gone bad

I have read this question: I have tried the following: ALTER database mydbname CHARACTER SET utf8 COLLATE utf8_general_ci; ALTER table ext_hebrewText CHARACTER SET utf8 COLLATE utf8_general_ci; My table has one column in Hebrew: And I have various Javascripts that format and color it to show on the screen. This is the way it is current […]

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