<?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=a3d9da63442" 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, 08 Aug 2026 01:28:59 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><item><title><![CDATA[Reply to Dolibarr package forces a utf8mb3 DB connection → 4-byte chars (emoji) rejected on write on Mon, 08 Jun 2026 07:52:05 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/benjaminj" aria-label="Profile: BenjaminJ">@<bdi>BenjaminJ</bdi></a> you have to use something like <a href="https://docs.cloudron.io/packages/dolibarr/#manual-utf8mb4-migration" target="_blank" rel="noopener noreferrer nofollow ugc">https://docs.cloudron.io/packages/dolibarr/#manual-utf8mb4-migration</a> to migrate an existing installation .</p>
]]></description><link>https://forum.cloudron.io/post/125585</link><guid isPermaLink="true">https://forum.cloudron.io/post/125585</guid><dc:creator><![CDATA[girish]]></dc:creator><pubDate>Mon, 08 Jun 2026 07:52:05 GMT</pubDate></item><item><title><![CDATA[Reply to Dolibarr package forces a utf8mb3 DB connection → 4-byte chars (emoji) rejected on write on Sun, 07 Jun 2026 20:06:03 GMT]]></title><description><![CDATA[<p dir="auto">Awesome, thank you <a class="plugin-mentions-user plugin-mentions-a" href="/user/girish" aria-label="Profile: girish">@<bdi>girish</bdi></a> ! We'll pull the package update and confirm 4-byte writes (emoji) go through.</p>
]]></description><link>https://forum.cloudron.io/post/125575</link><guid isPermaLink="true">https://forum.cloudron.io/post/125575</guid><dc:creator><![CDATA[BenjaminJ]]></dc:creator><pubDate>Sun, 07 Jun 2026 20:06:03 GMT</pubDate></item><item><title><![CDATA[Reply to Dolibarr package forces a utf8mb3 DB connection → 4-byte chars (emoji) rejected on write on Sun, 07 Jun 2026 18:49:17 GMT]]></title><description><![CDATA[<p dir="auto">Fixed now</p>
]]></description><link>https://forum.cloudron.io/post/125574</link><guid isPermaLink="true">https://forum.cloudron.io/post/125574</guid><dc:creator><![CDATA[girish]]></dc:creator><pubDate>Sun, 07 Jun 2026 18:49:17 GMT</pubDate></item><item><title><![CDATA[Reply to Dolibarr package forces a utf8mb3 DB connection → 4-byte chars (emoji) rejected on write on Sun, 07 Jun 2026 15:01:08 GMT]]></title><description><![CDATA[<p dir="auto">Looks like we unfortunately copied this from the example conf - <a href="https://github.com/Dolibarr/dolibarr/blob/96ae7bf09bcff16446d2e8dfe1b0237167337b83/htdocs/conf/conf.php.example#L156" target="_blank" rel="noopener noreferrer nofollow ugc">https://github.com/Dolibarr/dolibarr/blob/96ae7bf09bcff16446d2e8dfe1b0237167337b83/htdocs/conf/conf.php.example#L156</a></p>
]]></description><link>https://forum.cloudron.io/post/125570</link><guid isPermaLink="true">https://forum.cloudron.io/post/125570</guid><dc:creator><![CDATA[girish]]></dc:creator><pubDate>Sun, 07 Jun 2026 15:01:08 GMT</pubDate></item></channel></rss>