<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Dolibarr package forces a utf8mb3 DB connection → 4-byte chars (emoji) rejected on write]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">On our Dolibarr install (Cloudron, MySQL addon), creating a <strong>ticket</strong> (or any record) that contains a 4-byte character (e.g. an emoji <img src="https://forum.cloudron.io/assets/plugins/nodebb-plugin-emoji/emoji/android/1f60a.png?v=74f512c8ff7" class="not-responsive emoji emoji-android emoji--blush" style="height:23px;width:auto;vertical-align:middle" title="😊" alt="😊" />) fails with:</p>
<pre><code>Incorrect string value: '\xF0\x9F\x98\x8A...' for column 'message'
</code></pre>
<p dir="auto"><strong>Root cause:</strong> the database and all schema tables are already <code>utf8mb4</code> (the Cloudron MySQL addon defaults to utf8mb4). The only <code>utf8mb3</code> link in the chain is the <strong>connection charset</strong>, which the package hardcodes in <code>/app/pkg/cloudron.conf.php</code>:</p>
<pre><code class="language-php">$dolibarr_main_db_character_set = 'utf8';        // = utf8mb3, 3 bytes max
$dolibarr_main_db_collation     = 'utf8_unicode_ci';
</code></pre>
<p dir="auto">So Dolibarr issues <code>SET NAMES utf8</code>, and MySQL rejects any 4-byte character on write.</p>
<p dir="auto">Because <code>cloudron.conf.php</code> is <code>include</code>d <strong>after</strong> <code>/app/data/conf/conf.php</code> (and is read-only), users cannot override the charset persistently — any change in <code>/app/data/conf/conf.php</code> gets overwritten.</p>
<p dir="auto"><strong>Suggested fix</strong> — set in <code>cloudron.conf.php</code>:</p>
<pre><code class="language-php">$dolibarr_main_db_character_set = 'utf8mb4';
$dolibarr_main_db_collation     = 'utf8mb4_unicode_ci';
</code></pre>
<p dir="auto">(Ideally also guard it so <code>/app/data/conf/conf.php</code> can override.) Existing installs already have utf8mb4 tables, so this only aligns the connection — no data migration needed.</p>
<p dir="auto">Thanks!</p>
]]></description><link>https://forum.cloudron.io/topic/15596/dolibarr-package-forces-a-utf8mb3-db-connection-4-byte-chars-emoji-rejected-on-write</link><generator>RSS for Node</generator><lastBuildDate>Sat, 06 Jun 2026 03:04:47 GMT</lastBuildDate><atom:link href="https://forum.cloudron.io/topic/15596.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 05 Jun 2026 18:23:38 GMT</pubDate><ttl>60</ttl></channel></rss>