If you have any problem with CentralEurope's words, for example : ľščťžýáíéúäňôď, I am try this problem by iconv() function.
<?php
// create example image
$im = imagecreate(200, 20);
$bg = imagecolorallocate($im, 255, 255, 255);
$textcolor = imagecolorallocate($im, 0, 0, 255);
$text = "ľščťžýáíéúäňôď...";
//simple convert string
$string = iconv("Windows-1250", "Latin2", $text);
// write converted string at the top left
imagestring($im, 4, 0, 0, $string, $textcolor);
// output the image
header("Content-type: image/png");
imagepng($im);
?>