SQL-UTF8MB4-001
DEFAULT CHARSET=utf8
utf8 (3-byte) instead of utf8mb4
Joomla 4+ and MySQL 8 expect utf8mb4. Plain utf8 cannot store emoji and some names.
DEFAULT CHARSET=utf8 → DEFAULT CHARSET=utf8mb4
What you will see
- Incorrect string value
Symptoms people search
emoji becomes ??? · utf8 charset
Replace this code
Swap DEFAULT CHARSET=utf8 for DEFAULT CHARSET=utf8mb4.
Joomla 3
Remove or stop calling this
CREATE TABLE `#__lms` (...) ENGINE=InnoDB DEFAULT CHARSET=utf8;Joomla 4 / 6
Use this instead
CREATE TABLE `#__lms` (...) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;How to fix it
- 1Use utf8mb4 in CREATE TABLE.
- 2Convert existing tables with a planned ALTER (backup first).
Also known as
utf8mb4 · CHARSET=utf8
Related issues
- Joomla 3 → 4Manifest / installer
Updater client 0 / 1 integers
<client>0</client> → site / administrator strings
- Joomla 3 → 4SQL / schema
MyISAM engine in install SQL
ENGINE=MyISAM → ENGINE=InnoDB
- Joomla 3 → 4SQL / schema
0000-00-00 dates
'0000-00-00 00:00:00' → NULL
- Joomla 3 → 4SQL / schema
SQL Server driver
sqlsrv → MySQL / MariaDB / PostgreSQL
- Joomla 3 → 4Joomla API
JUser::getParameters()
JUser::getParameters() → getParam($key) / setParam()
- Joomla 3 → 4Joomla API
JUserHelper::getCryptedPassword / getSalt
JUserHelper::getCryptedPassword() → UserHelper::hashPassword() / verifyPassword()