Search by

blueprint3d / module-allow-utf8mb4

stu583

Unlocks full UTF8MB4 database support for Magento 2 (Emojis and 4-byte characters)

Package info

github.com/BluePrint3D-Dev/module-allow-utf8mb4

Documentation

Language:HTML

Type:magento2-module

pkg:composer/blueprint3d/module-allow-utf8mb4

Statistics

Installs: 0

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v1.0.6 2026-09-12 14:31 UTC

This package is auto-updated.

Last update: 2026-09-12 14:50:56 UTC


README

Magento Version PHP Version MySQL Version License

⚠️ Requires MySQL 8.4+ (or an equivalent modern MariaDB). Below MySQL 8.0.29, Magento's own declarative schema has no way to keep these columns on utf8mb4 across repeated setup:upgrade runs, and this module's one-shot patch alone isn't enough to guarantee it stays fixed — see the fine print below before installing on an older database.

A lightweight, bulletproof Magento 2 module that permanently enables utf8mb4 encoding across your database. Finally, you can use emojis, extended multilingual characters, and complex Unicode symbols anywhere in your store without Magento destroying them.

🛑 The Problem

By default, older versions of Magento 2 configure MySQL tables to use the legacy 3-byte utf8 (or utf8mb3) character set. If a content manager or customer attempts to save a 4-byte character—like an emoji (🔥) or a rare Unicode symbol—Magento and MySQL will silently crash the string, chopping off the text and replacing your carefully crafted content with ???.

🛠️ The Solution

This module injects a targeted Data Patch into Magento's deployment cycle. It automatically converts crucial tables (like Products, CMS Pages, CMS Blocks, and Customer Data) to utf8mb4 and adjusts the active collation to utf8mb4_unicode_ci.

The result: Crisp, clean emojis and full 4-byte Unicode support across your entire frontend and backend.

✨ Features

  • Emoji Compatibility: Add emojis to product descriptions, category titles, and CMS blocks.
  • Zero Core Overrides: Built using native Magento 2 Data Patches and architecture.
  • Future-Proof Deployments: Automatically applies the correct database collations on deployment (setup:upgrade).
  • Data Safe: Alters collation and character sets without destroying or truncating existing store data.

📦 Installation

1. Install via Composer

composer require blueprint3d/module-allow-utf8mb4

2. Enable the module

php bin/magento module:enable BluePrint3D_AllowUtf8mb4

3. Run the database upgrade (This applies the UTF8MB4 Data Patch)

php bin/magento setup:upgrade

4. Compile and flush cache

php bin/magento setup:di:compile
php bin/magento cache:flush

👨‍💻 Usage

There is no Admin UI required. Once installed and upgraded, the module works silently in the background. Simply go to Content > Blocks or Catalog > Products and start pasting emojis! 🚀🍕🛒

🔍 The Fine Print

Magento's declarative schema has no column-level charset/collation attribute (only table-level), so on MySQL below 8.0.29, every setup:upgrade silently regenerates these columns using Magento's own legacy default charset — undoing the conversion, regardless of what this module declares. This isn't fixable purely from db_schema.xml.

On MySQL 8.4+ (or a modern MariaDB), Magento's own framework defaults these columns to utf8mb4 natively on every setup:upgrade, so this module's one-shot patch is all you need — it stays fixed with no further action. If you're still on an older MySQL version, upgrade the database first; don't rely on this module alone to keep emoji support working across future deploys.

📜 License

Copyright © 2026 BluePrint3D Ltd. All rights reserved.

This software is provided free of charge for personal or commercial use. However, the resale, redistribution, or sublicensing of this source code, modified or unmodified, for direct financial gain is strictly prohibited.

Please see the LICENSE.txt file for full terms and conditions.

Owned by: BluePrint3D Ltd (Company Registration Number: 13473806)
Email: support@blueprint3d.dev