diff --git a/CHANGES b/CHANGES index d2ab3b306..35a01d0d2 100644 --- a/CHANGES +++ b/CHANGES @@ -2950,4 +2950,5 @@ * redis: disable by default when optional * apps: fix issue where operations on stopped apps errored * eventlog: Fix incorrect eventlog that the update crashed +* database: change charset to utf8mb4. this allows emojis everywhere! diff --git a/src/database.js b/src/database.js index b4b669cec..bb1376b7d 100644 --- a/src/database.js +++ b/src/database.js @@ -53,7 +53,8 @@ async function initialize() { multipleStatements: false, waitForConnections: true, // getConnection() will wait until a connection is avaiable ssl: false, - timezone: 'Z' // mysql follows the SYSTEM timezone. on Cloudron, this is UTC + timezone: 'Z', // mysql follows the SYSTEM timezone. on Cloudron, this is UTC + charset: 'utf8mb4' }); gConnectionPool.on('connection', function (connection) { diff --git a/src/test/branding-test.js b/src/test/branding-test.js index 25c71d9f1..a376d5881 100644 --- a/src/test/branding-test.js +++ b/src/test/branding-test.js @@ -28,6 +28,12 @@ describe('Branding', function () { expect(name).to.be('Dolomites'); }); + it('can set emoji in name', async function () { + await branding.setCloudronName('🎊 Cloudron 🎉', auditSource); + const name = await branding.getCloudronName(); + expect(name).to.be('🎊 Cloudron 🎉'); + }); + it('cannot set large name', async function () { const [error] = await safe(branding.setCloudronName('x'.repeat(65), auditSource)); expect(error.reason).to.be(BoxError.BAD_FIELD);