PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Basically, i was wondering if it's possible to use UTF-8 characters in a dynamic image.
For example, I'd like to display the user's nick rather than their username on this image, but nicks often contain UTF-8 characters which don't display properly.
Eg:
But my nick is Јαςқρғ, which does not display properly.
Is their a way to fix this?
Thanks,
Jack.
Last edited by jackpf on Sat Jan 09, 2010 5:56 am, edited 1 time in total.
1. Are you sure the font you're using contains those characters?
2. Are you sure you're passing the text in the encoding that your print-on-image-function expects?
should be the same as making a > < show up in html?
Well, this is in an image...so it has nothing to do with HTML. Thanks for trying though
Apollo wrote:1. Are you sure the font you're using contains those characters?
2. Are you sure you're passing the text in the encoding that your print-on-image-function expects?
1. I'm just using the default font. I tried downloading one and using it...but I got the same results.
2. I'm not sure tbh If printed to the browser with UTF-8 encoding, it displays fine, so the data is stored correctly in the script. So it must be garbling it in imagestring().
jackpf wrote:I'm not sure tbh If printed to the browser with UTF-8 encoding, it displays fine, so the data is stored correctly in the script. So it must be garbling it in imagestring().
In that case, try the imagettftext function instead. It accepts UTF-8 strings.