#31079 [Opn->Bgs]: charset of imagestring
| From: | derick@php.net | Date: | Tue, 14 Dec 2004 08:10:21 +0000 |
| Subject: | #31079 [Opn->Bgs]: charset of imagestring | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-70189@lists.php.net to get a copy of this message | ||
ID: 31079
Updated by: derick@php.net
Reported By: roberto at spadim dot com dot br
-Status: Open
+Status: Bogus
Bug Type: GD related
Operating System: linux
PHP Version: 5.0.2
New Comment:
GD's internal fonts only support ISO-8859-2, this is not a bug.
Previous Comments:
------------------------------------------------------------------------
[2004-12-14 03:28:10] roberto at spadim dot com dot br
Description:
------------
when using default charset
CP850 on my system
some characters "ã" isn't printed with imagestring() function
how to show the default charset used by gd????
this can make my bug no more a bug
with a workaround i could change imagestring to image_string and make
the correct charset
thanks
Reproduce code:
---------------
<?
function image_cp_text($string){
$default=iconv_get_encoding('internal_encoding');
//CP850
// $str=$string;
$str=iconv($default,"CP850",$string);
return($str);
}
$im = imagecreate(100, 30);
$bg = imagecolorallocate($im, 255, 255, 255);
$textcolor = imagecolorallocate($im, 0, 0, 255);
imagestring($im, 5, 0, 0, image_cp_text("ã"), $textcolor);
header("Content-type: image/jpeg");
imagejpeg($im);
?>
Expected result:
----------------
image with all characters (ã)
Actual result:
--------------
none blank image
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=31079&edit=1