Problems with (some) UTF-8 characters

During writing a macro which stores an Email (in eml-format) as stuctured wiki document, I got the problem that emojs which are contained within the mail body as UTF-8 characters can not be stored.

It gives the error message when doing “doc.save()”

Failed to execute the [groovy] macro. Cause: [Data truncation: Incorrect string value: '\xF0\x9F\x98\x81\xF0\x9F...' for column xwiki.xwikidoc.XWD_CONTENT at row 1]. Click on this message for details.

Some investigations when putting the emojs with drag-and-drop into a WYSIWYG editor window

emojs

results in an error message “Server not responding” when saving.

Are there some restrictions within the usage of the UTF-8 character set ?

UTF-8 characters are possible: E.g. arrows work without problems.

Thanks

Norbert

Not in XWiki but if you are using MySQL you might want to make sure you use utf8mb4 (which supports UTF8 characters up to 4 bytes) instead of utf8 (which is actually an alias for utf8mb3 which support UTF8 characters up to 3 bytes only which does not include “recent” additions like emojis) as encoding.

After changing the MySQL databases the problem is solved.
Thanks
Norbert