php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #31079 charset of imagestring
Submitted: 2004-12-14 03:28 UTC Modified: 2004-12-14 09:10 UTC
From: roberto at spadim dot com dot br Assigned:
Status: Not a bug Package: GD related
PHP Version: 5.0.2 OS: linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
26 + 43 = ?
Subscribe to this entry?

 
 [2004-12-14 03:28 UTC] 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

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-12-14 09:10 UTC] derick@php.net
GD's internal fonts only support ISO-8859-2, this is not a bug.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun May 05 11:01:33 2024 UTC