The non-utf-8 characters, AKA ascii charset have decimal numbers and look like this.
& #48; which is zero. In utf-8, zero looks like this & #x30; and the 30 is hexadecimal. To interconvert among them you need these four php functions, dechex, hexdec, to change the numbers, and chr, to make the character from the decimal number, and ord to get the decimal number from the character. So ord('0') = 48. They can also handle the extended ascii characters. And with them you may have to use charset=iso8859-1, instead of utf-8.
Welcome to http://www.myphotowizard.net
where you can edit images, make a photo calendar, add text to images, and do much more.
When you know what you're doing it's called Engineering, when you don't know, it's called Research and Development. And you can always charge more for Research and Development.