When I create an image with PHP, it does not display UTF-8 characters properly.
$imgPath = 'uplatnica1.jpg';
$image = imagecreatefromjpeg($imgPath);
$color = imagecolorallocate($image, 000, 000, 000);
$string = "šđčćž";
$x = 70;
$y = 200;
$fontSize = 3;
imagestring($image, $fontSize, $x, $y, $string, $color);
imagejpeg($image, 'qwe.jpg');
How can I solve this problem?