Emojis support on tickets and custom fields

Everything related to Hesk - helpdesk software

Moderator: mkoch227

Post Reply
Mokomichi
Posts: 1
Joined: Thu Sep 11, 2025 3:47 pm

Emojis support on tickets and custom fields

Post 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
Klemen
Site Admin
Posts: 10209
Joined: Fri Feb 11, 2005 4:04 pm

Re: Emojis support on tickets and custom fields

Post 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',
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Post Reply