Displaying Arabic Texts as Image (Problems: arabic chars is reversed?)

From: Date: Wed, 18 Oct 2006 01:10:18 +0000
Subject: Displaying Arabic Texts as Image (Problems: arabic chars is reversed?)
Groups: php.general 
Request: Send a blank email to php-general+get-243266@lists.php.net to get a copy of this message
I had been looking for a solution on how to display arabic characters on an image using PHP "properly", but could not find yet a solution. Tried google, and nothing (Maybe the howto is written in arabic, i dont know). I found http://www.php4arab.org/, but could not understand the chars on how to join. Im hoping someone here do know how. I am able to display and save to mysql (database) the characters (which i copied and pasted from this site: http://www.unicode.org/standard/translations/arabic.html) When i display it on a browser.. i used.. <?php header("Content-type: text/html; charset=utf-8"); ?> On before saving on a database i do.. SET NAMES 'utf8' About the fonts, im using Arial Unicode MS. My problem is, whenever i display arabic characters like this one.. http://unicode.org/standard/translations/arabic.html (from) * ما هي الشفرة الموحدة "يونِكود" ؟* On the input box.. <input type="hidden" name="line_1_2" value=" ما هي الشفرة الموحدة "يونِكود" ؟"> Nothing has changed.. But the image generated was.. http://public.axishift.com/arabic_reverse.jpg And its really weird, its reversing by itself. Some lines i used to display the text on an image. imagettftext($background, 8, 0, 18, 140, $black, "fonts/$fonts", "$line_4"); Please help! -- Louie Miranda (lmiranda@gmail.com) http://www.axishift.com //JSM-W

« previous php.general (#243266) next »