Page 1 of 1

Emojis support on tickets and custom fields

Posted: Thu Sep 11, 2025 3:52 pm
by Mokomichi
Hi,

I am trying desesperately to get emojis on custom fields but without success.
I looked at mariadb side and everything is correct,
if i add emoji in custom_fields table it works.

i add mysqli_set_charset($hesk_db_link, 'utf8mb4'); into hesk_settings
but nothing has changed.

the <meta> is also in UTF-8

I suspect html_special_char or a mysql escaping.

I am still struggling to find how to make Hesk accept UTF-8 emojis

Thanks

Re: Emojis support on tickets and custom fields

Posted: Thu Sep 11, 2025 6:04 pm
by Klemen
You will most likely also need to edit the hesk_clean_utf8 function inside /inc/common.inc.php by removing the 2-byte cleanup part:

Code: Select all

	//reject overly long 2 byte sequences, as well as characters above U+10000 and replace with ?
	$in = preg_replace('/[\x00-\x08\x10\x0B\x0C\x0E-\x19\x7F]'.
	 '|[\x00-\x7F][\x80-\xBF]+'.
	 '|([\xC0\xC1]|[\xF0-\xFF])[\x80-\xBF]*'.
	 '|[\xC2-\xDF]((?![\x80-\xBF])|[\x80-\xBF]{2,})'.
	 '|[\xE0-\xEF](([\x80-\xBF](?![\x80-\xBF]))|(?![\x80-\xBF]{2})|[\x80-\xBF]{3,})/S',