29 feb 2008 kl. 03.41 skrev David Sveningsson:
Nathan Rixham skrev:
before going any further, your HTML page is in UTF-8 yes? with the
appropriate content-type line.
Yes, apache uses only utf-8 as charset and the html content-type
meta tag is set to utf-8 too. Also, the html form validates at
validator.w3.org
plus: first debugging step:
function preview(){
$title = html_entity_decode($_GET['title'], ENT_COMPAT, 'UTF-8');
print_r($title); #verify in view source / web browser that data is
correct before it's sent to imagettftext
I see the characters correctly, and page info in firefox says the
encoding is utf-8.
From the man page:
"If a character is used in the string which is not supported by the
font, a hollow rectangle will replace the character."...
If you are 100% sure that the var $title contains a valid UTF-8
encoded text sting (simply output the string to the browser and set
the page encoding to UTF-8), then the only thing that is left that
might screw up the text-to-image output is the font you are using. As
you might know, you can only use TrueType fonts.
//frank
ps sorry for posting my reply off-list the first time... ds.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php