I would like to know how to proceed in a situation. Where by default I create all the site files with UTF-8 encoding.
But when I tried to create an image with GD, the image appears broken ... Hence when I change to Western Europero (iso-8859-1). It works properly.
How do I work with this file created in UTF-8, so I can keep the pattern of creating the files?
<?php
header("Content-type: image/png");
$im = @imagecreate(200, 800)
or die("Cannot Initialize new GD image stream");
$background_color = imagecolorallocate($im, 0, 0, 0);
$text_color = imagecolorallocate($im, 233, 14, 91);
imagestring($im, 10, 5, 5, "A Simple é você Text String", $text_color);
imagepng($im);
imagedestroy($im);
?>