Jump to content

Gd Image In Ie


tal

Recommended Posts

Hello peoplei am having a very specific problemi can not print in IE7/8 the letter "nun" (נ or נ) in Hebrew while using GD image functions (as described below)i can print all other 26 letters but not that one (it shows as a square)but i can print all 27 letters including "nun" when viewed in FireFoxso is this a bug or there is a solution for it ?i am working with:- windows XP- php-5.3.0-Win32-VC6-x86.msi- apache_2.2.11-win32-x86-openssl-0.9.8i.msii will thank any one helping Talthis is my page written in notepad and saved as UTF-8--------------------------------------------------------------<?php$text="נ"; //only the letter "nun"//$text="אבגדהוזחטיכלמ סעפצקרשתץךףםן";//the rest of the letters without "nun"?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"><html> <head> <title>GD image in IE</title> </head> <body> <img src="image.php?text=<?php echo $text ?>" width="768" height="493" border=0 style="z-index:-1;"> </body></html>my image.php written in notepad and saved as ANSI------------------------------------------------------------<?php$path="path/to/a/picture.gif";$font_path="C:/WINDOWS/Fonts/david.ttf"; (david is a hebrew font it comes with the windows install cd) $text=$_GET['text'];$src=imagecreatefromgif($path);$size=getimagesize($path);$im=imagecreatetruecolor($size[0],$size[1]);imagecopy($im,$src,0,0,0,0,$size[0],$size[1]);$color=imagecolorallocatealpha($im,0,0,0,0);imagettftext($im,12,0,50,50,$color,$font_path,$text);header('Content-type: image/gif');imagegif($im);imagedestroy($im);imagedestroy($src);?>

Link to comment
Share on other sites

hy justsomeguyi have added "charset=utf-8" to the IMAGE header but still i get a square insted of the letter in IEheader('Content-type: image/gif; charset=utf-8');once again thank you for helping Tal

Link to comment
Share on other sites

hy justsomeguyexcuse me for my ignorance but i am confused at how and where to do that - do i do that in the apache conf ?- do i do that with adding a line to my html file ?- do i do that with a php function ?thank you for your time Tal

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...