From:             roberto at spadim dot com dot br
Operating system: linux
PHP version:      5.0.2
PHP Bug Type:     GD related
Bug description:  charset of imagestring

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 bug report at http://bugs.php.net/?id=31079&edit=1
-- 
Try a CVS snapshot (php4):   http://bugs.php.net/fix.php?id=31079&r=trysnapshot4
Try a CVS snapshot (php5.0): 
http://bugs.php.net/fix.php?id=31079&r=trysnapshot50
Try a CVS snapshot (php5.1): 
http://bugs.php.net/fix.php?id=31079&r=trysnapshot51
Fixed in CVS:                http://bugs.php.net/fix.php?id=31079&r=fixedcvs
Fixed in release:            http://bugs.php.net/fix.php?id=31079&r=alreadyfixed
Need backtrace:              http://bugs.php.net/fix.php?id=31079&r=needtrace
Need Reproduce Script:       http://bugs.php.net/fix.php?id=31079&r=needscript
Try newer version:           http://bugs.php.net/fix.php?id=31079&r=oldversion
Not developer issue:         http://bugs.php.net/fix.php?id=31079&r=support
Expected behavior:           http://bugs.php.net/fix.php?id=31079&r=notwrong
Not enough info:             
http://bugs.php.net/fix.php?id=31079&r=notenoughinfo
Submitted twice:             
http://bugs.php.net/fix.php?id=31079&r=submittedtwice
register_globals:            http://bugs.php.net/fix.php?id=31079&r=globals
PHP 3 support discontinued:  http://bugs.php.net/fix.php?id=31079&r=php3
Daylight Savings:            http://bugs.php.net/fix.php?id=31079&r=dst
IIS Stability:               http://bugs.php.net/fix.php?id=31079&r=isapi
Install GNU Sed:             http://bugs.php.net/fix.php?id=31079&r=gnused
Floating point limitations:  http://bugs.php.net/fix.php?id=31079&r=float
MySQL Configuration Error:   http://bugs.php.net/fix.php?id=31079&r=mysqlcfg

Reply via email to