utf8mb4

USAGE

DETAILS

  • Default Collation: utf8mb4_general_ci

  • Max Length: 4 bytes

The collation names accepted for this character set are:

SYNONYMS

SCHEMA

PARAMETERS

SKYSQL

PRIVILEGES

EXAMPLES

SELECT TYPEOF(_utf8mb4'Test') AS result1,
       TYPEOF(CONVERT('Test' USING utf8mb4)) AS result2\G
*************************** 1. row ***************************
result1: varchar(255) CHARACTER SET utf8 not null
result2: varchar(65535) CHARACTER SET utf8mb4
CREATE TABLE charset_example (
  name VARCHAR(32),
  description VARCHAR(64) CHARSET utf8mb4
);
SET NAMES utf8;
SET @txt = _utf8"Dji pou magnî do vêre, çoula m' freut nén må.";

INSERT INTO charset_example VALUES
  ('test 1', CONVERT(@txt USING utf8mb4)),
  ('test 2', 'A normal string.');
SELECT name,
       LENGTH(description) AS bytes,
       CHAR_LENGTH(description) AS chars
FROM charset_example;
+--------+-------+-------+
| name   | bytes | chars |
+--------+-------+-------+
| test 1 |    50 |    45 |
| test 2 |    16 |    16 |
+--------+-------+-------+
SET SESSION character_set_connection = 'utf8mb4';

ERROR HANDLING

FEATURE INTERACTION

RESPONSES

DIAGNOSIS

ISO 9075:2016

CHANGE HISTORY

Release Series

History

23.09

  • Present starting in MariaDB Xpand 23.09.1.

6.1

  • Present starting in MariaDB Xpand 6.1.0.

6.0

  • Present starting in MariaDB Xpand 6.0.3.

5.3

  • Present starting in MariaDB Xpand 5.3.13.

Release Series

History

6.0

  • Present starting in MariaDB Xpand 6.0.3.

5.3

  • Present starting in MariaDB Xpand 5.3.13.

Release Series

History

6.1

  • Present starting in MariaDB Xpand 6.1.0.

EXTERNAL REFERENCES