dbfiddle mysql add tag
Vérace
There's a problem with dbfiddle.uk with the MySQL instances (see the thread [here](https://dba.stackexchange.com/questions/269014/does-mysql-8-ascii-vs-utf8mb4-0900-ai-ci-size-differ-when-only-using-ascii-chara) 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!

Edit:

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:

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

live demo:

<>https://dbfiddle.uk/?rdbms=mysql_5.6&fiddle=8a63cd4bb9924ea3684234819a621461


This is discussed in the MySQL documentation for [Connection Character Sets and Collations](https://dev.mysql.com/doc/refman/5.6/en/charset-connection.html#charset-connection-client-configuration)

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

```sql
SET NAMES 'utf8mb4';
```

(live demo)

<>https://dbfiddle.uk/?rdbms=mysql_5.6&fiddle=276e8be76652ba5ceab7fb0b59037cbb

or, better yet, in the config file:

```
[mysql]
default-character-set=utf8mb4
```

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.