ID: 49153 Updated by: j...@php.net Reported By: andy at bdnews24 dot com -Status: Open +Status: Bogus Bug Type: GD related Operating System: Win Server 2003 Enterprise SP2 PHP Version: 5.2.10 New Comment:
Please do not submit the same bug more than once. An existing bug report already describes this very problem. Even if you feel that your issue is somewhat different, the resolution is likely to be the same. Thank you for your interest in PHP. See bug #34670 Previous Comments: ------------------------------------------------------------------------ [2009-08-04 14:05:41] andy at bdnews24 dot com Description: ------------ Using imagettftext some Bengali unicode text that combines characters (uses diacritics) doesn't render properly: it displays too many characters. Maybe the same as this (ancient) post: http://www.mail-archive.com/php-gene...@lists.php.net/msg78902.html. I'm afraid I can't find a free unicode Bengali font - I used MS Arial Unicode. I've made a zip file with a screenshot and the repro code (in case the UTF-8 string literal screws up on the way to your database;) that's available at http://cl-t199-020cl.privatedns.com/repro.zip. Reproduce code: --------------- <? header('Content-type: text/html; charset=utf-8'); if (!mb_internal_encoding("UTF-8")) p_echo("couldn't set internal encoding to utf-8"); $string="ছাত্র বিক্ষোভের"; $text_size=12; $im = imagecreate(15*$text_size,$text_size); imagecolorallocate($im,255,255,255); //bg colour $black=imagecolorallocate($im,0,0,0); //fg colour imagettftext($im, $text_size, 0, 0, $text_size, $black, "arialuni.ttf", $string); imagegif($im, "repro.gif"); echo($string."<br>"); echo("<img src=\"repro.gif\">"); ?> Expected result: ---------------- I expect to see two copies of the same text. The top copy is text rendered by the browser, the bottom copy is a gif file. Actual result: -------------- The browser-rendered text displays correctly, the gif file is different and incorrect. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=49153&edit=1