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
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: roberto at spadim dot com dot br
New email:
PHP Version: OS:

 

 [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: Thu Apr 25 23:01:29 2024 UTC