mysql dbfiddle add tag
There's a problem with with the MySQL instances (see the thread [here]( on dba.stackexchange).

It appears that the MySQL instances give erroneous results for byte and charater count for strings in Asian languages using the utf8mb4 CHARACTER SET - see my comments and Solomon Rutsky's replies in the thread.

The SQL Server fiddle **does** behave correctly!


Rick James has added a thorough post that explains what is happening behind the scenes.
Top Answer
Solomon Rutzky
I found the problem. As I had suspected, the following system session variables are all set to `latin1`:

* `character_set_client`
* `character_set_results`
* `character_set_connection`

You can see this by executing the following:

SHOW SESSION VARIABLES LIKE 'character\_set\_%';

live demo:


This is discussed in the MySQL documentation for [Connection Character Sets and Collations](

This can be fixed either per each session / connection using `SET NAMES`:

SET NAMES 'utf8mb4';

(live demo)


or, better yet, in the config file:


Enter question or answer id or url (and optionally further answer ids/urls from the same question) from

Separate each id/url with a space. No need to list your own answers; they will be imported automatically.