PHP 7 update and imagejpg text character broken

42 Views Asked by At

I'm using imagettftext and imagepng or imagejpeg. The character problem does not occur when I use it in PHP 5.6 version. But when I upgrade to php 7 this problem starts. The characters of other country languages ​​appear corrupted. No change in code. Problem only when i upgrade php 5.6 version to 7.4 I would be very grateful if anyone with an idea could post it. Thank you. This text : TEST Çiçek Sok. Çiç example

1

There are 1 best solutions below

0
yigit On
$item_text = mb_encode_numericentity($item_text,
array (0x0, 0xffff, 0, 0xffff), 'UTF-8');

this worked for me. But why does this happen in 7 while php 5.6 doesn't have this issue?